Custom icon for a radio button
Right click on your drawable folder then->new->android xml file->choose root element "selector" then paste code below in the file:
<item android:drawable="@drawable/tire" android:state_checked="true"/>
<item android:drawable="@drawable/tireinvert" android:state_checked="false"/>
then in xml of your radio button add this line:
android:button="@drawable/radio"
here radio is the selector xml file which we have created in the drawable folder
//first create custom_radio_search_location.xml
file for custom radio in your drawable
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true"
android:drawable="@drawable/invite_radio_check" />
<item android:state_checked="false"
android:drawable="@drawable/invite_radio_uncheck" />
</selector>
//than use this custom_radio_search_location.xml
in your layout
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="3" >
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent"
android:button="@drawable/custom_radio_search_location"
android:checked="true"
android:text="A"
android:textColor="@android:color/black" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent"
android:button="@drawable/custom_radio_search_location"
android:text="B"
android:textColor="@android:color/black" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:color/transparent"
android:button="@drawable/custom_radio_search_location"
android:text="C"
android:textColor="@android:color/black" />
</RadioGroup>