Currently I have a really simple code that validates EditText fields and when the user hits the button at the end it checks them. It will put errors in all the fields with this:
if (!emailmatcher.matches()) {
email.setError("Invalid Email");
}
if (!zipmatcher.matches()) {
zipcode.setError("Invalid ZipCode");
}
My problem that is the keyboard will popup and will move the error bubble to a random place. I was hoping to not have a error bubbles with a message but keep the error icons in invalid EditText fields. I tried inputting setError(null) but that doesn’t work. Any Ideas?
Your code perfect to show icon only.
As
EditTextis show anything related to when it has focused. So just change your code to like that…