1.
RadioGroup的clearCheck方法
可设置RadioButton为初始的都不选中状态。在做完点击事件后,RadioGroup.clearCheck();就可以了。直接挨个setChecked(false)会出问题,下次点击不会变为选中状态
2.
设置RadioButton的默认选中, 使用setChecked(true) 这样会使RadioButton一直处于选中状态.
我们应该给RadioGroup 设置选中的RadioButton
代码:
radioGroup.check(radioButton.getId());