I have two edit text.First one is email and the second one is a password field.
When I click login button without filling the both fields, the hint color and underline changes to red color in both fields are an unfocused state.
unfocused state at the landing page, the color should be in blue colorenter image description here
while clicking login without filling fields in the unfocused stateenter image description here.
This is my requirement.
I have tried all possible ways to achieve this scenario.
But I cant control focused and unfocused state.
Please guide me to solve this issues.
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="colorControlActivated">@color/primary</item> <item name="colorControlHighlight">@color/colorPrimary</item> </style>
i want to change the hint color,underline color in unfocused state programmatically.
colors.xml
<resources> <color name="primary">#1976d2</color> <color name="primary_dark">#E12929</color> <color name="primary_darker">#CC1D1D</color> <color name="accent">#000000</color> <color name="blue">#1976d2</color> <color name="black">#000000</color> <color name="lightblue">#1976d2</color> <color name="lightgray">#666666</color> </resources>