With reference to the new TextInputLayout
released by Google, how do I change the floating label text color?
Setting colorControlNormal
, colorControlActivated
, colorControlHighLight
in styles does not help.
This is what I have now:
With reference to the new TextInputLayout
released by Google, how do I change the floating label text color?
Setting colorControlNormal
, colorControlActivated
, colorControlHighLight
in styles does not help.
This is what I have now:
Its Working for me ..... add hint color in TextInputLayout
You don't need to use
android:theme="@style/TextInputLayoutTheme"
to change the floating label color, since it's going to affect to the entire theme for the small TextView used as label. Instead, you could useapp:hintTextAppearance="@style/TextInputLayout.HintText"
where:Let me know if the solution works :-)
you should change your colour here
In the latest version of the support library (23.0.0+),
TextInputLayout
takes the following attribute in XML to edit the floating label color:android:textColorHint="@color/white"
To change color of hint and edit text underline color : colorControlActivated
To change character counter color : textColorSecondary
To change error message color : colorControlNormal
To change password visibility button tint : colorForeground
For more info on TextInputLayout read http://www.zoftino.com/android-textinputlayout-tutorial
Instead of Brahmam Yamani answer I prefer to use Widget.Design.TextInputLayout as parent. That ensures, that all required items are present, even if not all items are overwritten. In Yamanis answer, the app will crash with an unresolvable resource, if setErrorEnabled(true) is called.
Simply change the style to the following: