1.1 Custom CheckBox Select Picture
The custom checkbox is used android:background instead of android:button , because the button custom picture is too large to be truncated when used, and is background freely stretched when used.
1.1.1 Customizing button pictures
<?XML version= "1.0" encoding= "Utf-8"?><selectorxmlns:android= "Http://schemas.android.com/apk/res/android"> <Itemandroid:drawable= "@drawable/usercenter_delete_havor"android:state_checked= "true" /> <Itemandroid:drawable= "@drawable/usercenter_delete_default"android:state_checked= "false" /> <Itemandroid:drawable= "@drawable/usercenter_delete_default" /></selector>
1.1.1 Customizing the CheckBox style
<stylename= "Videodownloadcheckbox"Parent= "@android: Style/widget.compoundbutton.checkbox"> <Itemname= "Android:button">@null</Item> <Itemname= "Android:background">@drawable/usercenter_delete_selector</Item></style>
1.1.3 Use
< CheckBox Android:layout_width = "25DP" android:layout_height= "25DP" style= "@style/videodownloadcheckbox" />
[Android] Custom checkbox