Textinputlayout With Floating Lables On White Background Visibility Issue In Andorid
I am creating the simple login screen having textimputlayout floating labels. The java file and xml is given below. protected void onCreate(Bundle savedInstanceState) {
Solution 1:
You can change color of floating labels using theme, just add below code in your styles.xml
<stylename="TextAppearence.App.TextInputLayout"parent="@android:style/TextAppearance"><itemname="android:textColor">@color/red</item><itemname="android:textSize">14sp</item></style>
And then apply this theme to you TextInputLayout
<android.support.design.widget.TextInputLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:textColorHint="@color/gray"app:hintTextAppearance="@style/TextAppearence.App.TextInputLayout"><android.support.v7.widget.AppCompatEditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="@string/hint" /></android.support.design.widget.TextInputLayout>
Post a Comment for "Textinputlayout With Floating Lables On White Background Visibility Issue In Andorid"