Created
August 3, 2016 03:28
-
-
Save Nathaniel100/bcb4136bd66a45c848f1c5ac9a9258b6 to your computer and use it in GitHub Desktop.
hide soft keyboard
This file contains hidden or 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
// Check if no view has focus: | |
View view = this.getCurrentFocus(); | |
if (view != null) { | |
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); | |
imm.hideSoftInputFromWindow(view.getWindowToken(), 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment