android - Change EditText hint color when using TextInputLayout -


i using new textinputlayout design library. able show , change color of floating label. unfortunately actual edittext hint white.

i have tried changing hintcolor in xml, styles, , programmatically , tried using android.support.v7.widget.appcompatedittext edittext hint shows white.

here xml textinputlayout , edittext

<android.support.design.widget.textinputlayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android.support.design:hinttextappearance="@style/greentextinputlayout">       <edittext      android:layout_width="match_parent"         android:layout_height="wrap_content"         android:id="@+id/city"         android:textcolorhint="@color/black"         android:hint="@string/city" />  </android.support.design.widget.textinputlayout> 

and here style using textinputlayout (i tried making hinttextcolor attribute black didn't me):

<style name="greentextinputlayout" parent="@style/textappearance.appcompat">     <item name="android:textcolor">@color/homestory_green</item> </style> 

define android:textcolorhint in application theme:

<style name="apptheme" parent="theme.appcompat.noactionbar">     <item name="colorprimary">@color/primary</item>     <item name="colorprimarydark">@color/primary_dark</item>     <item name="coloraccent">@color/accent</item>      <item name="android:textcolorhint">@color/secondary_text</item> </style> 

source


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -