单选按钮不可点击

Nas*_*ran 2 android

我已经使用four单选按钮创建了一个应用程序.问题是最后一个单选按钮最初是不可点击的,直到你点击其他按钮.点击其他单选按钮后,最后一个单选按钮变为clickable.plz告诉我如何解决这个问题.提前致谢.

private void uncheckAllOptions()
    {
        myOption1.setChecked(true);
        myOption2.setChecked(true);
        myOption3.setChecked(true);
        myOption4.setChecked(true);

        myOption1.setChecked(false);
        myOption2.setChecked(false);
        myOption3.setChecked(false);
        myOption4.setChecked(false);

}
Run Code Online (Sandbox Code Playgroud)

我正在使用此代码保存单选按钮的状态,但最后一个单选按钮始终保持不可点亮状态,除非单击前3个单选按钮之一

Sam*_*iya 5

使用clearCheck() function of RadioButtonGroup to clear all RadioButtons.

myOption4.setChecked(false);下次检查另一个RadioButton之前,无法检查使用.

喜欢, radioButtonGroup.clearCheck();