问题描述:

Is it acceptable under Material Design to display error messages like these:

using EditText.setError().

I ask because I also see this:

https://material.google.com/patterns/errors.html#

which explains a different sort of format but does nothing to explain how you're supposed to reliably change the color of the EditText, which from my research on SO has shown to be very difficult.

There is also TextInputLayout which supports setting errors, but it uses a rather fixed color scheme and doesn't display hint text like the above spec link shows (in that link see how something like "First Name" is hint text on the EditText itself). Instead the TextInputLayout looks like this:

Which is even harder to navigate if red happens to be one of your accent colors.

So is the first picture that I displayed considered acceptable in Material Design?

相关阅读:
Top