Skip to content

Color selector for enabled disabled state not working #49

@PriyaSindkar

Description

@PriyaSindkar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions