fix: NPE in Export Sticker

This commit is contained in:
xtaodada 2022-08-18 17:55:03 +08:00
parent c484830b81
commit 3cee1d1aac
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -98,7 +98,6 @@ class BottomBuilder(val ctx: Context, val needFocus: Boolean = true, val bgColor
val checkBoxCell = TextCheckCell(ctx, 21, !switch)
checkBoxCell.setBackgroundDrawable(Theme.getSelectorDrawable(false))
checkBoxCell.minimumHeight = AndroidUtilities.dp(50F)
rootView.addView(checkBoxCell, LayoutHelper.createLinear(-1, -2))
if (valueText == null) {
checkBoxCell.setTextAndCheck(text, value, true)
@ -106,6 +105,8 @@ class BottomBuilder(val ctx: Context, val needFocus: Boolean = true, val bgColor
checkBoxCell.setTextAndValueAndCheck(text, valueText, value, true, true)
}
rootView.addView(checkBoxCell, LayoutHelper.createLinear(-1, -2))
checkBoxCell.setOnClickListener {
val target = !checkBoxCell.isChecked
checkBoxCell.isChecked = target
@ -119,7 +120,6 @@ class BottomBuilder(val ctx: Context, val needFocus: Boolean = true, val bgColor
}
return checkBoxCell
}
@JvmOverloads