in an android activity, i first recover the text in an EditText and add then a TextWatcher to it.
private static int WC = 0;
public void onCreate(Bundle save
Solution is to move your addTextChangedListener to onPostCreate method. all will be solved.
This definitely must be happening. You are setting text when savedinstanceState is not null (meaning your previous object states are saved).
I think that this happens because you added the TextWatcher to your EditText in the onCreate method, and next time onCreate gets called (e.g. after a configuration change) then it finds that the TextWatcher has already been added to the EditText.
If you want to check for this situation, put this before your condition:
if(savedInstanceState == null){
Log.e("savedInstance state is null", "no text");
et.setText("No text");
}
In this case, if you call setText on your EditText, then afterTextChanged(Editable s) will not be called.