Differences between TextWatcher ‘s onTextChanged, beforeTextChanged and afterTextChanged

The parameters for beforeTextChanged and onTextChanged are a little hard to understand at first. It may be helpful to see them being used in an example. Watch the following demonstration a few times. Pay attention to the counts. The red highlight is the old text that is about to be replaced by the green text. … Read more

Android TextWatcher.afterTextChanged vs TextWatcher.onTextChanged

These events are called in the following order: beforeTextChanged(CharSequence s, int start, int count, int after). This means that the characters are about to be replaced with some new text. The text is uneditable. Use: when you need to take a look at the old text which is about to change. onTextChanged(CharSequence s, int start, … Read more