public final class CEPTextWatcher
extends java.lang.Object
implements android.text.TextWatcher
TextWatcher responsável por formatar e validar um EditText para CEPs.
Para usar este componente basta criar uma instância e chamar
TextView.addTextChangedListener(TextWatcher).| Constructor and Description |
|---|
CEPTextWatcher()
Construtor default
|
CEPTextWatcher(EventoDeValidacao callbackErros)
Inicializa o validador com um callback de erros.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterTextChanged(android.text.Editable s) |
void |
beforeTextChanged(java.lang.CharSequence s,
int start,
int count,
int after) |
void |
onTextChanged(java.lang.CharSequence s,
int start,
int before,
int count) |
public CEPTextWatcher()
public CEPTextWatcher(EventoDeValidacao callbackErros)
callbackErros - Instância que será chamada quando houverem erros.public void beforeTextChanged(java.lang.CharSequence s,
int start,
int count,
int after)
beforeTextChanged in interface android.text.TextWatcherpublic void onTextChanged(java.lang.CharSequence s,
int start,
int before,
int count)
onTextChanged in interface android.text.TextWatcherpublic void afterTextChanged(android.text.Editable s)
afterTextChanged in interface android.text.TextWatcher