I don’t know why my RadioGroup dividers are not showing. Will someone please shed some light. I already looked at Android radiogroup, divider between radiobuttons.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:divider="@drawable/divider_color"
android:showDividers="middle" >
<RadioButton
android:id="@+id/first"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:button="@null"
android:checked="true"
android:drawableRight="@android:drawable/btn_radio"
android:text="First" />
<RadioButton
android:id="@+id/second"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="@android:drawable/btn_radio"
android:text="second" />
<RadioButton
android:id="@+id/third"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:button="@null"
android:drawableRight="@android:drawable/btn_radio"
android:text="third" />
</RadioGroup>
</LinearLayout>
My shape for divider_color
is
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line" >
<solid android:color="#000000" />
</shape>