Check box android java code

Following is procedure to make your own style for CheckBox or RadioButton

1. Create image drawables for checked and unchecked
2. create selector for above checked and unchecked drawables as shown below

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android=""> <item android:state_checked="true" android:drawable="@drawable/star_down" /> <item android:state_checked="false" android:drawable="@drawable/star" /> </selector>

3. Add this selector as android:button attribute for CheckBox or RadioButton

Sign In or Register to comment.