Here is my layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFFFF">
<RadioGroup
android:id="@+id/choices_group"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_centerInParent="true"
android:orientation="vertical"
android:background="@drawable/rounded_bg" >
<RadioButton
android:id="@+id/choice_a"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="5dp"
android:text="Choice A" />
<RadioButton
android:id="@+id/choice_b"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Choice B" />
<RadioButton
android:id="@+id/choice_c"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Choice C" />
<RadioButton
android:id="@+id/choice_d"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="Choice D" />
</RadioGroup>
</RelativeLayout>
Why are the radio buttons superimposed over the text?
Problem was with the padding. Once I removed the padding, everything worked as usual. This might be a bug.
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