I have a layout with 6 RadioButtons.
They are both horizontally and vertically.
How can I solve this problem? Since using 3 RadioGroups, I can not unmark the radiobutton that is outside the group. So I can dial up to 3 RadioButtons, but it should be just a dial-up.
How to solve in layout or programmatically. Thanks
Following layout:
<RadioGroup
android:id="@+id/radiogroup_map1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/branco"
android:text="Case 1"
android:textColor="@color/branco" />
<RadioButton
android:id="@+id/rb_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:buttonTint="@color/branco"
android:text="Case 2"
android:textColor="@color/branco" />
</RadioGroup>
<RadioGroup
android:id="@+id/radiogroup_map2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/branco"
android:text="Case 3"
android:textColor="@color/branco" />
<RadioButton
android:id="@+id/rb_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:buttonTint="@color/branco"
android:text="Case 4"
android:textColor="@color/branco" />
</RadioGroup>
<RadioGroup
android:id="@+id/radiogroup_map3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/branco"
android:text="Case 5"
android:textColor="@color/branco" />
<RadioButton
android:id="@+id/rb_6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:buttonTint="@color/branco"
android:text="Case 6"
android:textColor="@color/branco" />
</RadioGroup>