I have a search view which is set as expanded by default with default search query but i don\'t want the virtual keyboard.In below code i tried to hide keyboard in o
try
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);