混淆配置:处理databing导致混淆问题

This commit is contained in:
Max
2024-01-17 16:45:24 +08:00
parent fdc7d338c1
commit b27df1cb89
2 changed files with 14 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ package com.nnbc123.app.relation.cp.dialog
import android.content.Context
import android.text.Editable
import android.view.View
import androidx.core.view.isVisible
import com.nnbc123.app.R
import com.nnbc123.app.databinding.DialogCpMpBinding
import com.nnbc123.app.treasure_box.widget.dialog.BaseBindingDialog
@@ -15,7 +16,16 @@ class CpMpDialog(context: Context, private val type: Int) :
View.OnClickListener {
//type:0 申请 1 定制
override fun init() {
binding.pageType = type
if (type == 0) {
binding.layoutRoot.setBackgroundResource(R.mipmap.bg_cp_mp_card_apply)
binding.groupApply.isVisible = true
binding.groupCustomized.isVisible = false
} else {
binding.layoutRoot.setBackgroundResource(R.mipmap.bg_cp_mp_card_customized)
binding.groupApply.isVisible = false
binding.groupCustomized.isVisible = true
}
binding.click = this
// binding.data = ?
binding.editCpMpCustomized.addTextChangedListener(textWatcher)
@@ -46,11 +56,11 @@ class CpMpDialog(context: Context, private val type: Int) :
super.afterTextChanged(editable)
if (editable?.length ?: 0 > 0) {
if (!hasEnabled) {
binding.customizeEnable = true
binding.ivCpMpCustomized.setImageResource(R.mipmap.ic_cp_mp_customized_enable)
hasEnabled = true
}
} else {
binding.customizeEnable = false
binding.ivCpMpCustomized.setImageResource(R.mipmap.ic_cp_mp_customized_disable)
hasEnabled = false
}
}

View File

@@ -3,19 +3,8 @@
<data>
<!--0 申请 1 定制-->
<variable
name="pageType"
type="Integer" />
<import type="com.nnbc123.app.R" />
<import type="android.view.View" />
<variable
name="customize_enable"
type="Boolean" />
<variable
name="click"
type="android.view.View.OnClickListener" />
@@ -25,7 +14,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="316dp"
android:layout_height="188dp"
android:background="@{pageType==0?R.mipmap.bg_cp_mp_card_apply:R.mipmap.bg_cp_mp_card_customized}"
android:id="@+id/layout_root"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15">
@@ -157,7 +146,6 @@
android:layout_height="@dimen/dp_32"
android:layout_marginBottom="@dimen/dp_16"
android:onClick="@{click}"
android:src="@{customize_enable?R.mipmap.ic_cp_mp_customized_enable:R.mipmap.ic_cp_mp_customized_disable}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
@@ -167,14 +155,12 @@
android:id="@+id/group_apply"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="@{pageType==1?View.GONE:View.VISIBLE}"
app:constraint_referenced_ids="layout_mp_current,layout_mp_next,btn_require_current,btn_require_next" />
<androidx.constraintlayout.widget.Group
android:id="@+id/group_customized"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="@{pageType==0?View.GONE:View.VISIBLE}"
app:constraint_referenced_ids="edit_cp_mp_customized,tv_cp_mp_customized,iv_cp_mp_customized" />
</androidx.constraintlayout.widget.ConstraintLayout>