android - EditText setError() with no message just the icon -


currently have simple code validates edittext fields , when user hits button @ end checks them. put errors in fields this:

if (!emailmatcher.matches()) {     email.seterror("invalid email");   } if (!zipmatcher.matches()) {     zipcode.seterror("invalid zipcode");                      } 

my problem keyboard popup , move error bubble random place. hoping not have error bubbles message keep error icons in invalid edittext fields. tried inputting seterror(null) doesn't work. ideas?

your code perfect show icon only.

as edittext show related when has focused. change code that...

if (!emailmatcher.matches()) {     email.requestfocus();     email.seterror("invalid email");   } if (!zipmatcher.matches()) {     zipcode.requestfocus();     zipcode.seterror("invalid zipcode");                      } 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -