Answer the question
In order to leave comments, you need to log in
RadioButton, how to make a button to the right of the text?
Actually I'm trying to make a normal radioButton with a button to the right of the text, but it doesn't work. API 23.
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/radioGroup"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:layout_gravity="end">
<android.support.v7.widget.AppCompatRadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/radioButton1"
android:gravity="right"
android:text="sdf"/>
<android.support.v7.widget.AppCompatRadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/radioButton2"
android:gravity="right"
android:text="sdfsdf"/>
<android.support.v7.widget.AppCompatRadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/radioButton3"
android:gravity="right"
android:text="sdfsdf"/>
</RadioGroup>
Answer the question
In order to leave comments, you need to log in
You need to use style attributes. Like this :
The full description is like this:
<android.support.v7.widget.AppCompatRadioButton
android:layout_width="match_parent"
android:button="@null"
android:drawableRight="?android:attr/listChoiceIndicatorSingle"
android:layout_height="wrap_content"
android:id="@+id/radioButton1"
android:gravity="right"
android:text="sdf"/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question