How can I find out which stock drawable resource is being used for a checkbox?
If I create a checkbox and leave the button drawable untouched in the XML or the Android Studio properties bar then I get a checkbox that looks like below:
I'd like to know what that drawable is because it has a nice animation when the state of the checbox changes from unchecked to checked.
Looking through the drawable resources that come with Android Studio as standard it seems like android.R.drawable.checkbox_off_background
is the only default checbox, but this isn't the one shown above - checkbox_off_background
looks like below:
Two questions, then:
-
How can I find which drawable is being used for the checkbox in the top screenshot so that I can use it elsewhere?
-
How would I trigger the animation between the checked and unchecked versions of the drawable if it wasn't being used as a checbox button drawable?
Aucun commentaire:
Enregistrer un commentaire