Created
September 23, 2014 23:15
-
-
Save frhan/cdc43f0a36adf2403dda to your computer and use it in GitHub Desktop.
android- hide sof keyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void hideSoftKeyboard() | |
{ | |
InputMethodManager inputManager = (InputMethodManager) | |
getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); | |
View v = getActivity().getCurrentFocus(); | |
if(v == null) | |
return; | |
inputManager.hideSoftInputFromWindow(v.getWindowToken(), | |
InputMethodManager.HIDE_NOT_ALWAYS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment