I have an OutlinedBox TextInputLayout and I want to change the box color in the unfocused mode of editText.
How can I do that?
In the theme Add colorOnSurface
attribute and assign any color you want
The result is:
Also colorPrimary
is the color of focused state.
Other attributes you can customize are:
- true
- true
- outline
- @null
- @color/mtrl_outline_end_icon_tint
- 0dp
- @dimen/mtrl_textinput_box_corner_radius_medium
- @dimen/mtrl_textinput_box_corner_radius_medium
- @dimen/mtrl_textinput_box_corner_radius_medium
- @dimen/mtrl_textinput_box_corner_radius_medium
- @color/mtrl_outlined_stroke_color
- ?attr/textAppearanceCaption
- ?attr/textAppearanceCaption
- ?attr/textAppearanceCaption
- ?attr/textAppearanceCaption
- ?attr/textAppearanceCaption
- @color/mtrl_indicator_text_color
- @color/mtrl_error
- @color/mtrl_error
- @color/mtrl_indicator_text_color
- ?attr/colorPrimary
- @color/mtrl_indicator_text_color
- ?attr/shapeAppearanceSmallComponent
- @null