Explanation:
I have a common application where there are several components EditText
, where I assign them a handler that would be this here:
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");
}
};
It's working okay, and the debugger goes in right, the events are triggered, however I'd like to have access to View which is triggering the events to gain access to the .setText()
method.
Question:
How do I access the View
that triggered a handler event TextWatcher
?