I have a group of radio stations in my project, how to uncheck all the checkboxes before starting and how to uncheck the box if another checkbox is selected. When I clicked on another button, he did not uncheck the other, and I can’t figure out how to deal with it. I can’t even get the index of these buttons, I mean, I can get the value of the text field. I got the code on but, unfortunately, it clearly does not explain its code.
code
<RadioGroup
android:id="@+id/radioGender"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/genderMale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Male"
android:checked="true" />
<RadioButton
android:id="@+id/genderFemale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female" />
</RadioGroup>
source
share