OK, this question has been asked many times, and I looked through a lot of topics about it, but I can't get it to work.
My searchView not in actionBar, so I cannot use collapseActionView()
I tried
searchView.clearFocus();//this closes the keyboard but does not remove focus getActivity().getCurrentFocus().clearFocus(); //basically the same as above searchView.setQuery("", false); //this clears the query and drops the keyboard searchView.setIconified(true); // but the search retains focus and keyboard pops up again
No matter what I try, I cannot remove focus from the searchView after selecting it
source share