SwitchButton
SwitchButton copied to clipboard
Color selector for enabled disabled state not working
I used a color selector for checked_color to disable grey color if the button is disabled (enabled = false) but it is taking no effect.
Like so-
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- disabled state -->
<item android:color="@color/grey" android:state_enabled="false" />
<item android:color="@color/blue" />
</selector>
How do I grey out the switch when I disable the button?