8

TextWatcher.afterTextChanged has incorrect string after backspace

view full story
linux-howto

http://stackoverflow.com – I am using a TextWatcher to listen to key inputs. When user types '@', I open up a listactivity and user has to choose from the list. Once choosen, I place the selected item's text(including the initial @) to the edittext and normal editing goes on. The issue is that when I press backspace, the string I get in aftertextchanged event is wrong, and the listactivity again pops up. editText.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void be (HowTos)