With reference to the new TextInputLayout released by Google, how do I change the floating label text color?
Setting colorControlNormal,
Try The Below Code It Works In Normal State
In Styles Folder TextLabel Code
Set To Main Theme of App,It Works Only Highlight State Only
- @color/Color Name
Update:
UnsupportedOperationException: Can't convert to color: type=0x2 in api 16 or below
Solution
Update:
Are you using Material Components Library
You can add below lines to your main theme
- @color/your_color
// Activated State
- @color/your_color
// Normal State
or else do you want different colors in noraml state and activated state and with customization follow below code
Add the below line to your main theme or else you can set style to textinputlayout in your xml
- @style/Widget.App.TextInputLayout