Reputation: 265
I have a listview , on top of it there is a auto complete textview. Onclick of listview and autocomplete textview text ,it goes the detail activity. when back button is pressed,it comes from detail activity to list view page but the autocomplete textview contains same searched product term. How can i keep it empty so that it is ready to type(in stead of deleting it again and again)?
Thanks..
Upvotes: 2
Views: 1382
Reputation: 41096
One way would be in your onResume() method in activity, get the reference to your AutoCompleteTextView and use setText() method to set text as empty. and use requestFocus() to give focus to AutocompleteTextview.
Upvotes: 2