How to make a RadioButon without text?

Viewed 1180

I just want a simple RadioBttun without text and I did the code below but what I get is a radiobutton widget with little space that is I think reserved to the text. So How should get rid of this space ?

<RadioButton
    android:id="@+id/rb_topup_item_account_selection_status"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@null" />

enter image description here

1 Answers

Just add the below attributes to the RadioButton element in your XML layout. It will remove the default padding.

android:minWidth="0dp"
android:minHeight="0dp"
Related