I am working on an Android application.In my app I have to use images based on the text.So I write OnChangeListener() for EditText.The following is
OnChangeListener()
EditText
One more solution can be to use boolean variable, so that it doesn't get into infinite callstack and eventually giving stackoverflow exception
stackoverflow exception
public void afterTextChanged(Editable s) { if(!flag) { flag = true; edt.setText("string"); flag = false; } }