I am using RadioButton in my layout. Where i have provided background to the RadioButton. Below is the code
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@null"
android:background="@drawable/rb_spain"
android:id="@+id/am_rb_spain" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@null"
android:background="@drawable/rb_germany"
android:layout_marginLeft="@dimen/margin_15"
android:layout_marginRight="@dimen/margin_15"
android:id="@+id/am_rb_german" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@null"
android:background="@drawable/rb_english"
android:id="@+id/am_rb_english" />
</RadioGroup>
RadioButton background drawable
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_checked="false" android:drawable="@drawable/ic_spain" />
<item android:state_checked="true" android:drawable="@drawable/ic_spain_pressed" /> //pressed image is Large in size
<item android:drawable="@drawable/ic_spain" /> <!-- default -->
</selector>
I have saved the selection in TinyDB so that app will remember my selection whenever i open my app. But whenever i open my app the default selected RadioButton background Appears Large.
I have taken all the images of same size in drawable's with same padding.
First flag is Default selected here. But it appear to be slightly large in size

Now i have pressed 2nd flag. But first flag is not coming to its normal state.

You should change your android:button="@null" to android:button="@drawable/rb_germany" and remove background from each RadioButton. It will run fine.
Your updated RadioButton should be like:
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/rb_spain"
android:id="@+id/am_rb_spain" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With