I have a EditText
with a Mask "##-###.###" and the result is 11-111.111, so I decided to use a TextWatch, so I did..
cepFrom.addTextChangedListener(new TextWatcher() {
@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(s.length() == 10){
//getCepFrom(s.toString());
Toast.makeText(DetalhesProdutos.this, "OK", Toast.LENGTH_SHORT).show();
}
}
@Override
public void afterTextChanged(Editable s) {
}
});
Which will consume a WebService, but just for testing, the Toast with the OK message, executes twice and I dont' know why...