Como obter o contexto do método View in TextWatcher?
Eu tenho um manipulador que é umTextWatcher
e eu não sei como obter oView
isso mudou o texto.
Aqui está o meu manipulador:
TextWatcher handler = new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
// TODO Auto-generated method stub
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
oldText = s.toString();
}
@Override
public void afterTextChanged(Editable s) {
//v.setText("afterTextChanged");
}
};
Observe a parte comentada, é isso que eu quero, para obter oView
deEditText
que acionou o evento, para alterar o texto após a alteração.
Como eu posso alcançar isso.setText()
método dentro doafterTextChanged evento? (Como o evento onClick, essa visualização év
)