i'm using textinputlayout floating label hints. in normal state unable change hint color white other color. there way ?
<android.support.design.widget.textinputlayout android:id="@+id/fullnametextlayout" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:layout_weight="0.75"> <edittext android:id="@+id/etfullname" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginstart="15dp" android:layout_marginleft="15dp" android:layout_marginend="15dp" android:layout_marginright="15dp" android:singleline="true" android:hint="full name" android:textcolor="@color/gray_dark" android:textcolorhint="@color/green" android:textcolorhighlight="@color/green" /> </android.support.design.widget.textinputlayout>
attaching 2 screen shots background changed.
please add in textinputlayout,
app:hinttextappearance="@style/mytext
so layout :
<android.support.design.widget.textinputlayout android:id="@+id/aeal_input_layout_zipcode" android:layout_width="match_parent" android:layout_height="wrap_content" android:textcolorhint="@color/green" app:hinttextappearance="@style/mytext"> <edittext android:id="@+id/aeal_etzipcode" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="zipcode" android:singleline="true" android:inputtype="number" android:textcolor="@color/primarytextcolor" /> </android.support.design.widget.textinputlayout>
style.xml:
<style name="mytext" parent="@android:style/textappearance"> <item name="android:textcolor">@color/green</item> <item name="android:textcolorhint">@color/green</item> <item name="coloraccent">@color/green</item> <item name="android:textsize">14sp</item> </style>
edited : need add textcolorhint in textinputlayout, , work needed.
it worked me, might too.
Comments
Post a Comment