When I return from another activity to the main activity, the searchView gains focus and the keyboard opens, I managed to stop the keyboard from opening by using:
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
but this is not sufficient, if the actionbar drop down menu is opened and closed the keyboard reappears, because the searchView still has focus (remember I only closed the keyboard). I have tried to get a reference to the searchView and make it lose focus, but this has not worked.
So basically, I just want the searchView to never have focus or prompt the keyboard to open, unless the searchView text area is actually touched.