|
@@ -57,7 +57,7 @@ class MediaBoxView @JvmOverloads constructor(
|
|
view_mediaBox_dialog.setOnClickListener {}
|
|
view_mediaBox_dialog.setOnClickListener {}
|
|
|
|
|
|
/** Move media box view to bottom of parent(hide it) **/
|
|
/** Move media box view to bottom of parent(hide it) **/
|
|
- val size = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
|
|
|
|
|
|
+ val size = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)
|
|
val v = view_mediaBox_dialog
|
|
val v = view_mediaBox_dialog
|
|
v.measure(size, size)
|
|
v.measure(size, size)
|
|
v.y = v.top + v.measuredHeight.toFloat()
|
|
v.y = v.top + v.measuredHeight.toFloat()
|
|
@@ -69,7 +69,7 @@ class MediaBoxView @JvmOverloads constructor(
|
|
viewGroup_mediaBox_pageContainer.removeAllViews()
|
|
viewGroup_mediaBox_pageContainer.removeAllViews()
|
|
}
|
|
}
|
|
val textBoxStyleView = TextBoxStyleView(context)
|
|
val textBoxStyleView = TextBoxStyleView(context)
|
|
- val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
|
|
|
|
|
|
+ val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
viewGroup_mediaBox_pageContainer.addView(textBoxStyleView, params)
|
|
viewGroup_mediaBox_pageContainer.addView(textBoxStyleView, params)
|
|
textBoxStyleView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
textBoxStyleView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
override fun onTitleButtonClick() {
|
|
override fun onTitleButtonClick() {
|
|
@@ -232,7 +232,7 @@ class MediaBoxView @JvmOverloads constructor(
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.TEXT_BOX)
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.TEXT_BOX)
|
|
if (changed) {
|
|
if (changed) {
|
|
val textBoxTabView = TextBoxTabView(context)
|
|
val textBoxTabView = TextBoxTabView(context)
|
|
- val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
|
|
|
|
|
|
+ val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
viewGroup_mediaBox_pageContainer.addView(textBoxTabView, params)
|
|
viewGroup_mediaBox_pageContainer.addView(textBoxTabView, params)
|
|
textBoxTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
textBoxTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
override fun onTitleButtonClick() {
|
|
override fun onTitleButtonClick() {
|
|
@@ -246,7 +246,7 @@ class MediaBoxView @JvmOverloads constructor(
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.SIGNATURE)
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.SIGNATURE)
|
|
if (changed) {
|
|
if (changed) {
|
|
val signatureTabView = SignatureTabView(context)
|
|
val signatureTabView = SignatureTabView(context)
|
|
- val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
|
|
|
|
|
|
+ val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
viewGroup_mediaBox_pageContainer.addView(signatureTabView, params)
|
|
viewGroup_mediaBox_pageContainer.addView(signatureTabView, params)
|
|
signatureTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
signatureTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
override fun onTitleButtonClick() {
|
|
override fun onTitleButtonClick() {
|
|
@@ -260,7 +260,7 @@ class MediaBoxView @JvmOverloads constructor(
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.STAMP)
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.STAMP)
|
|
if (changed) {
|
|
if (changed) {
|
|
val stampTabView = StampTabView(context)
|
|
val stampTabView = StampTabView(context)
|
|
- val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
|
|
|
|
|
|
+ val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
viewGroup_mediaBox_pageContainer.addView(stampTabView, params)
|
|
viewGroup_mediaBox_pageContainer.addView(stampTabView, params)
|
|
stampTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
stampTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
override fun onTitleButtonClick() {
|
|
override fun onTitleButtonClick() {
|
|
@@ -274,7 +274,7 @@ class MediaBoxView @JvmOverloads constructor(
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.SHAPE)
|
|
val changed = setupContent(view as ImageButton, MediaBoxTabType.SHAPE)
|
|
if (changed) {
|
|
if (changed) {
|
|
val shapeTabView = ShapeTabView(context)
|
|
val shapeTabView = ShapeTabView(context)
|
|
- val params = ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT)
|
|
|
|
|
|
+ val params = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
viewGroup_mediaBox_pageContainer.addView(shapeTabView, params)
|
|
viewGroup_mediaBox_pageContainer.addView(shapeTabView, params)
|
|
shapeTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
shapeTabView.onMediaBoxHeaderClickListener = object: MediaBoxHeader.OnTitleButtonClickListener {
|
|
override fun onTitleButtonClick() {
|
|
override fun onTitleButtonClick() {
|