Last active
September 24, 2019 11:27
-
-
Save anilkumar416/cd736ab62adb53f5525b12b8210e2af6 to your computer and use it in GitHub Desktop.
Hide 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
// Hide the keyboard. | |
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | |
imm.hideSoftInputFromWindow(view.windowToken, 0) | |
// Show the keyboard. | |
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | |
imm.showSoftInput(editText, 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment