I have current code
<?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/list_button_selected" />
<item
android:state_pressed="true"
android:drawable="@drawable/list_button_pressed" />
<item
android:drawable="@drawable/list_button" />
</selector>
for my CheckedTextView and it works. But when it’s checked and I press on it, it shows default android color for background. How can I overwrite that? I tried
<item
android:state_checked="true"
android:state_pressed="true"
android:drawable="@drawable/list_button_selected" />
But it does not work.
In my case, order is important. I had to switch checked and pressed and its working now.