By following this link android-radiobutton-image-and-text I'm able to show radio button with image and text both.
if I use drawableLeft, the drawable image comes in between the radio icon(circular icon to show if selected or not) and the text.
But what I want is to show first the drawable image to extreme left, then radio icon having some space(margin/padding) from drawable and then the text to right side.
I'm able to show below, but i want that tractor image to the left of that circular icon
my code below:`
<RadioGroup
android:id="@+id/radio_group_machine_type"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical">
<RadioButton
android:id="@+id/radio_btn_tractor"
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="10dp"
android:drawableLeft="@drawable/tractor_icon"
android:text="@string/tractor_label" />
<View
style="@style/Divider"
android:layout_height="1dp"
android:background="@color/black_tint_40" />
<RadioButton
android:id="@+id/radio_btn_combine"
android:layout_width="match_parent"
android:drawableRight="@drawable/car_icon"
android:layout_height="50dp"
android:text="@string/combine_label" />
</RadioGroup>
</LinearLayout>`
I tried using taking a ImageView to left of RadioButton, then the issue comes that click on ImageView don't select the radio button.
So is it possible?