Skip to content

Instantly share code, notes, and snippets.

@basarik
Last active February 15, 2017 14:40
Show Gist options
  • Save basarik/943ae7deb582df8376e12ed6979abc46 to your computer and use it in GitHub Desktop.
Save basarik/943ae7deb582df8376e12ed6979abc46 to your computer and use it in GitHub Desktop.
to hide keyboard, call the methody. You do not need any edittext
//to hide keyboard, call the method
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment