Reputation: 1378
how do I change the color of underline of TextInputLayout?
I have tried to set colorControlNormal, colorControlActivated, colorControlHighLight in themes but it does not work.
I want to set the color of underline white instead of black:
Upvotes: 1
Views: 6561
Reputation: 69689
please apply a custom theme in your text input layout
example
<style name="MYAppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorControlNormal">#c5c5c5</item>
<item name="colorControlActivated">@color/colorPrimary</item>
<item name="colorControlHighlight">@color/colorPrimaryDark</item>
</style>
Upvotes: 3
Reputation: 95
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#FFFFFF</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">#FFFFFF</item>
</style>
Upvotes: 0
Reputation: 4220
Try this my friend
<style name="MYAppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#FF0000</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">#FF0000</item>
Upvotes: 0
Reputation: 157437
I have a style for that where I override
<style name="FormLabel">
<item name="colorControlNormal">@color/white</item>
<item name="colorControlActivated">@color/white</item>
<item name="colorControlHighlight">@color/white</item>
</style>
and I set this style to the EditText
wrapped around the TextInputLayout
.
Upvotes: 1
Reputation: 611
To change bottom line color, you can try this in your app Theme like below:
<style name="Theme.App.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorControlNormal">#fffff</item>
<item name="colorControlActivated">#fffff</item>
<item name="colorControlHighlight">#fffff</item>
</style>
Upvotes: 1