MRB
MRB

Reputation: 452

Android get theme colors, disabled button

Is there a way to read current theme colors from code ?

I want to 1. Read disabled Button color and put it as EditText background 2. Read Spinner selected item color and put it as TextView background

Upvotes: 0

Views: 203

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006614

Read disabled Button color and put it as EditText background

Disabled is not a color. It is a state of a StateListDrawable that is used for the button background. Hence, you cannot "read disabled Button color", because there is no simple color for "disabled".

Read Spinner selected item color and put it as TextView background

The selected item in a Spinner has no specific color, as so therefore I have no idea what color you might mean here.

Upvotes: 1

Related Questions