Custom_checkbox.xml file:
<?xml version= "1.0" encoding= "Utf-8"? ><selector xmlns:android= "http://schemas.android.com/apk/res/ Android "> <item android:drawable=" @drawable/btn_unselect "android:state_checked=" false "/> < Item android:drawable= "@drawable/btn_select" android:state_checked= "true"/></selector>
In Styles.xml
<style name= "Custom_checkbox" parent= "@android: Style/widget.compoundbutton.checkbox" > <item name= " Android:button "> @drawable/custom_checkbox</item> </style>
Checkbox:
<CheckBox android:layout_width= "Wrap_content" android:layout_height= "Wrap_content " android:checked=" true " android:text=" Full (not) selected " android:layout_margin=" 10dip " android:paddingleft=" 10dip " android:textsize=" 20SP " style = "@style/custom_checkbox" android:textcolor
Note:
paddingleft The distance between the left icon and the text on the right
Custom checkbox in Android