On the form there is mAutoComplete, after entering some text into it, a value is selected from the drop-down list and a transition to another activity takes place. The problem is that if you return to the previous activity (where the text was entered), the text remains and I can’t clear it at all. Tried it like this, but it didn't help:

mAutoComplete.setText(""); 

inserted this line into the onCreate method. How do I clear text in mAutoComplete?

    1 answer 1

    Most likely it remains due to the fact that you are trying to do this in OnCreate. Try in onResume like this:

     @Override protected void onResume() { super.onResume(); mAutoComplete.setText(""); }