I have an annoying problem with TextWatcher. i\'ve been searching the web but couldnt find anything. appreciate if someone could assist me.
For some reason t
For me the below code worked. Please observe that boolean value has been changed after if condition loop in afterTextChanged method
edittext.addTextChangedListener(new TextWatcher()
{
boolean considerChange = false;
public void beforeTextChanged(CharSequence cs, int start, int count, int after) {}
public void onTextChanged(CharSequence cs, int start, int before, int count) {}
public void afterTextChanged(Editable editable)
{
if (considerChange)
{
// your code here
}
considerChange = !considerChange; //see that boolean value is being changed after if loop
}
});