Issue: Change the border color or box stroke of TextInputLayout when unfocused

47 views Asked by At

Problem statementI have this TextInputLayout and its initial box stroke color is black by default but I want it to be of specific color as I have two themes for my application. I have specified boxstroke colors in style file but its not applying when unfocused.

What I found on internet I found this answer help full: Stack Overflow

Overwriting default color of textinputlayout:

<color name="mtrl_textinput_default_box_stroke_color">#fff</color>

Question ? As I have different themes in my application I need to change this dynamically.(orange for light theme and white for dark theme)

Reference Images from: Stack Overflow Question

Unfocused Black box stoke Initial Black box stoke

Focused White box stoke Focused White box stoke

For now I am setting default color to lite gray so it can match both of themes

0

There are 0 answers