'Android Material TextInputLayout hint/label colors
I have a material TextInputLayout and am trying to make the hint a different colour when the input is in an "empty resting state", where the hint is shown as a placeholder, than when in a "filled resting state", when the text is shown as a label in the upper left (I'm using outline view).
I have to do this programmatically, I can't use styles (the colors are dynamic and are coming from a server at runtime).
I can get a different color when the edittext has focus, but cannot figure out how to get a different color for the filled/empty non-focused states.
Is this just not possible?
On a related topic, I cannot figure out the difference between: et.setHintTextColor(csl); et.setDefaultHintTextColor(csl);
And then there's a .setPlaceholderTextColor(csl) that doesn't seem to do anything!
To me, it would make sense for one of these to control the "label" and another the "hint".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
