I have a search widget on my actionbar but my problem is that when I get back from the result activity the widget is still open. I want it to return on the initial state before I clicked on the actionbar button. I tried on the onSaveInstanceState of the main activity the below code but I doesn't worked. Any ideas?
protected void onSaveInstanceState(Bundle outState){
super.onSaveInstanceState(outState);
searchView.setQuery("", false);
searchView.clearFocus();
searchView.setIconified(true);
}