Nitesh Verma Nitesh Verma - 3 months ago 370x
Android Question

how to change color of TextinputLayout's label and edittext underline android

I am using android design library's TextinputLayout. But couldn't customize the hint color, label color and the underline color of EditText inside TextinputLayout. Please help.

Dev Dev

To change bottom line color, you can use this in your app theme:

<item name="colorControlNormal">#c5c5c5</item>
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlHighlight">@color/accent</item>

For more info, Check THIS THREAD.

To change floating label color

<style name="TextAppearence.App.TextInputLayout" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/main_color</item>

and use it like:

   app:hintTextAppearance="@style/TextAppearence.App.TextInputLayout" >