9

How do we dismiss actionbar SearchView?

view full story
linux-howto

http://stackoverflow.com – I want to dismiss my actionbar searchview after the user submits a search. This is what I have: SearchView.OnQueryTextListener listener = new OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String query) { mSearchView.setIconified(true); return false; } }; but it appears to have no effect. I've also tried keeping a reference to its menu item and doing: mSearchMenuItem.collapseActionView(); no effect. What am I doing wrong? Thanks (HowTos)