In our app we use EditText
with TextInputLayout
to show validation errors. Everything worked fine until we updated to latest support library
Version 23.2.0 of design library introduced Theme.Design.*
family of themes which mirror a subset of AppCompat themes but define this attribute on top of it:
- @color/design_textinput_error_color_light
Either have your theme extend Theme.Design.*
or copy the above line to your theme.
The textColorError
attribute has to be defined in your theme in order to use error states in TextInputLayout
. Otherwise it will crash just as you mentioned.
You can use your own error color value of course.
The default values are @color/design_textinput_error_color_light
for light themes and @color/design_textinput_error_color_dark
for dark themes.
If you're using support library version 26+ it looks like this
- ?attr/colorError
for both light and dark themes.