Skip to content

Instantly share code, notes, and snippets.

@antew
Created February 17, 2013 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antew/4973295 to your computer and use it in GitHub Desktop.
Save antew/4973295 to your computer and use it in GitHub Desktop.
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {}
@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) {}
/**
* If the user receives an error message due to a blank field, this
* automatically clears the error on the field once they remedy it.
*/
@Override
public void afterTextChanged(Editable s) {
if (username.getText().length() > 0 && username.getError() != null)
username.setError(null);
if (password.getText().length() > 0 && password.getError() != null)
password.setError(null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment