AutoCompleteTextView setError

允我心安 提交于 2021-01-27 07:53:37

问题


Password field is AutoCompleteTextView and I'm trying to do setError when it's empty, but I don't want this red exclamation mark to show. How should I do this?

P.S. field on top of this, is also AutoCompleteTextView, (mailview) but when I do setError when it's empty, red exclamation mark doesn't show.


回答1:


To do that, you need to use com.android.support....23.0.0.

as well as dont use setError so that extra exclamation will not appear instead use some other way to show error.

according to me, this is a bug on updating to com.android.support....24.0.0 in TextInputLayout as password and setError exclamation will be overrite.

you should use only one of them.




回答2:


You have to call setError method like this:

setError("Error", null)


来源:https://stackoverflow.com/questions/39368147/autocompletetextview-seterror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!