I currently have a SearchView in the action bar of my app. When I click the search icon, the SearchView expands and the keyboard pops up as expecte
SearchView
I prefer !searchView.isIconified() over if(isSearchViewVisible) inside the onBackPressed() method as option 2 does not work when you have fragments added in your fragmentmanager's backstack that you would like to show when the back button is pressed.
!searchView.isIconified()
if(isSearchViewVisible)
onBackPressed()
fragmentmanager's
backstack