Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of How can I programatically hide or suppress the search suggestions list? without wasting too much if your time.
The question is published on by Tutorial Guruji team.
The question is published on by Tutorial Guruji team.
How can I programatically hide the list of suggestions that pops up up below the SearchView
?
There are times when I’d like the SearchView
to not be inconified and to not have focus. I can do this both using the setIconified(false)
and the clearFocus()
methods respectively, but if the SearchView
has any text in it, it will display the list of a search suggestions and I need to hide/suppress that.
Answer
Try to set an OnQueryTextListener
to your search view, and return true
on onQueryTextChange
when you don’t want any suggestions to show up.
We are here to answer your question about How can I programatically hide or suppress the search suggestions list? - If you find the proper solution, please don't forgot to share this with your team members.