1, first res/drawable in the definition of writing the following style:
<?xml version="1.0"encoding="Utf-8"? ><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/check_true"Android:state_checked="true"></item> <item android:drawable="@drawable/check_true"Android:state_selected="true"></item> <item android:drawable="@drawable/check_true"Android:state_pressed="true"></item> <item android:drawable="@drawable/check_false"></item></selector>
2. Add a CheckBox control to layout:
<CheckBox Android:id="@+id/radiobutton1"Android:layout_width="wrap_content"Android:layout_height="wrap_content"Android:background="@drawable/btn_check"Android:button="@null"android:checked="true"/>
Where Drwable/btn_check is the top file name in 1, and Android:button must be set to @null.
@drawable/check_true and @drawable/check_false are different pictures of the checkbox, which can be designed by themselves.
Customize checkbox style in Android