Skip to content

Instantly share code, notes, and snippets.

@danieloskarsson
Created July 9, 2013 12:36
Show Gist options
  • Save danieloskarsson/5957013 to your computer and use it in GitHub Desktop.
Save danieloskarsson/5957013 to your computer and use it in GitHub Desktop.
Hide and Show Keyboard in Android
View view = ...
InputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE)
inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
inputMethodManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment