开发者

How to keep the autocomplete textview empty(ready to type)?

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 i开发者_如何学Gos 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..


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜