mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 09:27:41 +08:00
修复:转发规则编辑页面关闭自定义模板/正则替换时没有清空输入框
This commit is contained in:
parent
82b552672f
commit
f34bfa926f
@ -191,10 +191,23 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
|
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
|
||||||
val visibility = if (isChecked) View.VISIBLE else View.GONE
|
|
||||||
when (buttonView?.id) {
|
when (buttonView?.id) {
|
||||||
R.id.sb_sms_template -> binding!!.layoutSmsTemplate.visibility = visibility
|
R.id.sb_sms_template -> {
|
||||||
R.id.sb_regex_replace -> binding!!.layoutRegexReplace.visibility = visibility
|
if (isChecked) {
|
||||||
|
binding!!.layoutSmsTemplate.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
binding!!.layoutSmsTemplate.visibility = View.GONE
|
||||||
|
binding!!.etSmsTemplate.setText("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
R.id.sb_regex_replace -> {
|
||||||
|
if (isChecked) {
|
||||||
|
binding!!.layoutRegexReplace.visibility = View.VISIBLE
|
||||||
|
} else {
|
||||||
|
binding!!.layoutRegexReplace.visibility = View.GONE
|
||||||
|
binding!!.etRegexReplace.setText("")
|
||||||
|
}
|
||||||
|
}
|
||||||
else -> {}
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user