1
You need to create a selector that way:
<?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/checked" />
<item android:state_checked="false" android:drawable="@drawable/unchecked" />
</selector>
Save it in the folder res/drawables/ by the name of cb_selector.xml
Then when it’s time to declare your checkbox, put it as a button, like this:
<CheckBox
android:id="@+id/cb"
android:text="My CheckBox"
android:button="@drawable/cb_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
I have no right access to Checkbox, I am using Multiselectlistpreference
– Iago Silva