I was reading about TextWatcher in Android programming. I could not find understand the difference between afterTextChanged and onTextChanged.
Although I referred to
TextChangedListener - Differences between onTextChanged, beforeTextChanged and afterTextChanged but still I am not able to think of a situation when I would need to use onTextChanged and not afterTextChanged.
I found an explanation to this on Android Dev Portal
**abstract void afterTextChanged(Editable s)** This method is called to notify you that, somewhere within s, the text has been changed. **abstract void beforeTextChanged(CharSequence s, int start, int count, int after)** This method is called to notify you that, within s, the count characters beginning at start are about to be replaced by new text with length after. **abstract void onTextChanged(CharSequence s, int start, int before, int count)** This method is called to notify you that, within s, the count characters beginning at start have just replaced old text that had length before.
So, the differences between the two are:
onTextChangeddoes not allow me to do that