当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Are these error messages considered valid for Material Design?

问题描述:

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?

分享给朋友:
您可能感兴趣的文章:
随机阅读: