如果在Java代码直接设置RadioButton的Checked方法,那么这个RadioButton就永远被选中了。
解决方法使用((RadioButton) RadioGroup.getChildAt(0)).setChecked(true);来选中RadioButton
解决方法使用((RadioButton) RadioGroup.getChildAt(0)).setChecked(true);来选中RadioButton
本文介绍了一种在Java中设置RadioButton始终处于选中状态的方法。通过特定的代码实现方式,可以确保RadioButton一旦被选中就不会改变状态。

被折叠的 条评论
为什么被折叠?