Created
February 19, 2021 19:47
-
-
Save CapTen101/ee38ac0fe2223a53c258fab1b946d0ea to your computer and use it in GitHub Desktop.
This method will hide the input keyboard in Android
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
| public static void hideKeyboard(Context context, View view) { | |
| InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.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