You can group RadioButtons with RadioGroup. Here is an example of how you can group RadioButtons using RadioGroup
<RadioGroup android:id="@+id/radioGroup1" android:layout_width="wrap_content" android:layout_height="wrap_content"> <RadioButton android:text="RadioButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/radio0" android:checked="true"></RadioButton> <RadioButton android:text="RadioButton" android:layout_width="wrap_content" android:id="@+id/radioButton1" android:layout_height="wrap_content"></RadioButton> </RadioGroup>
For more information, you can refer to this document.
source share