8

afterTextChanged crashes

view full story
linux-howto

http://stackoverflow.com – I tried to implement the Textwatcher interface, I am trying to change the text in afterTextChanged(), but it crashes. Why does this crash? : @Override public void afterTextChanged(Editable s) { Editable myText; if(s.toString().contains("hi")){ myText = s.append(" ho"); myEdit.setText(myText); } } Logcat 01-27 01:23:18.213: E/AndroidRuntime(2563): FATAL EXCEPTION: main 01-27 01:23:18.213: E/AndroidRuntime(2563): java.lang.StackOverflowError 01-27 01:23:18.213: E/AndroidRuntime(2563): at android (HowTos)