Java – How do I programmatically hide or suppress the list of search suggestions?

How do I programmatically hide or suppress the list of search suggestions?… here is a solution to the problem.

How do I programmatically hide or suppress the list of search suggestions?

How do I programmatically hide the list of suggestions that pop up below SearchView?

Sometimes I want SearchView not to be confused and has no focus. I can do this using the setIconified(false) and clearFocus() methods respectively, but if there is any text in the SearchView, it will show a list of search suggestions and I need to hide/suppress it.

Solution

searchView.setSuggestionsAdapter(null); Did that trick for me.

Related Problems and Solutions