开发者

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

开发者 https://www.devze.com 2023-04-02 01:48 出处:网络
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

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

精彩评论

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

关注公众号