mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-04 06:00:11 +00: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) {
|
||||
val visibility = if (isChecked) View.VISIBLE else View.GONE
|
||||
when (buttonView?.id) {
|
||||
R.id.sb_sms_template -> binding!!.layoutSmsTemplate.visibility = visibility
|
||||
R.id.sb_regex_replace -> binding!!.layoutRegexReplace.visibility = visibility
|
||||
R.id.sb_sms_template -> {
|
||||
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 -> {}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user