enter image description here

How to make a horizontal radiobutton selection with text? I think to use HorizontalScrollView, but I don’t know how to add text.

  • textview under image, not? Or if my memory serves me, the text next to the box is attached to the radiobutton as well as to toggle) - iFr0z

1 answer 1

<RadioGroup android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <RadioButton android:id="@+id/radioButton1" android:layout_width="match_parent" android:layout_height="wrap_content"/> <RadioButton android:id="@+id/radioButton2" android:layout_width="match_parent" android:layout_height="wrap_content"/> <RadioButton android:id="@+id/radioButton3" android:layout_width="match_parent" android:layout_height="wrap_content"/> <RadioButton android:id="@+id/radioButton4" android:layout_width="match_parent" android:layout_height="wrap_content"/> </RadioGroup> 

If you want the text below the button

 <RadioButton android:id="@+id/radioButton4" android:layout_width="match_parent" android:layout_height="wrap_content" android:button="@null" android:drawableTop="your_drawable"/>