SwitchButton icon indicating copy to clipboard operation
SwitchButton copied to clipboard

Color selector for enabled disabled state not working

Open PriyaSindkar opened this issue 3 years ago • 0 comments

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?

PriyaSindkar avatar Sep 06 '21 10:09 PriyaSindkar