1

TextWatcher's AfterTextChanged reacts on each key pressed?

view story
linux-howto

http://stackoverflow.com – I have an edit text view and I want to do some validation immediately after the user has stopped writing in the field and gone to the next one, so I decided that using AfterTextChanged would be a logical thing to do. The problem is, AfterTextChanged runs the code I've written within the paretheses after each keystroke. etUserPasswordSignupPage.addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable s) { //do some validation and then TOAST } }); And the Toast shows multiple times, while Im typin (HowTos)