SamIAmHarris SamIAmHarris - 1 year ago 137
Android Question

Change EditText hint color when using TextInputLayout

I am using the new TextInputLayout from the design library. I am able to get it to show and to change the color of the floating label. Unfortunately the actual EditText hint is now always white.

I have tried changing the hintColor in XML, styles, and programmatically and also tried using the
but the EditText hint always shows white.

Here is my XML for my TextInputLayout and EditText



android:hint="@string/city" />


And here is the style I am using for the TextInputLayout (I tried making the hintTextColor attribute black but didn't do anything for me):

<style name="GreenTextInputLayout" parent="@style/TextAppearance.AppCompat">
<item name="android:textColor">@color/homestory_green</item>

Answer Source

Looks like the parent view had a style for a 3rd party library that was causing the EditText to be white.


Once I removed this everything worked fine.