Skip to content

Instantly share code, notes, and snippets.

@anilkumar416
Last active September 24, 2019 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anilkumar416/cd736ab62adb53f5525b12b8210e2af6 to your computer and use it in GitHub Desktop.
Save anilkumar416/cd736ab62adb53f5525b12b8210e2af6 to your computer and use it in GitHub Desktop.
Hide Keyboard
// 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