Android Question Can StateListDrawable control the Button's Text Color?


Well-Known Member
Licensed User
Longtime User
My buttons have a transparent background and I want the button text to have 3 colors that indicates the state of the button:

Enabled : Button.TextColor = Black
Disabled: Button.TextColor = Gray
Pressed : Button.TextColor = Yellow

From the tutorial on StateListDrawable it appears StateListDrawable can control only the background color of the view (in my case it is a button) and its corner radius.

Is there a way to use a StateListDrawable to control the color of the button's text?
Or am I forced to do this manually using code?