Android ToggleButton not reliably receiving state_pressed
问题 I'm attempting to tint a Drawable using DrawableCompat but for some reason the Drawable is not always respecting state_pressed I have a ColorStateList which looks like: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="@color/black" android:state_pressed="true" /> <item android:color="@color/yellow" android:state_checked="true" /> <item android:color="@color/gray" /> </selector> I set this on my Drawable like so