it's android:button="@drawable/selector_checkbox"
to make it work
This may be achieved by using AppCompatCheckBox
. You can use app:buttonCompat="@drawable/selector_drawable"
to change the selector.
It's working with PNGs, but I didn't find a way for it to work with Vector Drawables.
I realize this is an old question, and the OP is talking about using custom gx that aren't necessary 'checkbox'-looking, but there is a fantastic resource for generating custom colored assets here: http://kobroor.pl/
Just give it the relevant details and it spits out graphics, complete with xml resources, that you can just drop right in.
One alternative would be to use a drawable/textview instead of a checkbox and manipulate it accordingly. I have used this method to have my own checked and unchecked images for a task application.
Source: Stackoverflow.com