Created
April 1, 2019 09:20
-
-
Save MohammadSamandari/2f5d5d372ce48ab979da8fb29bade9cc to your computer and use it in GitHub Desktop.
Learning: Hiding Keyboard After a button is clicked
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
// To Close The Keyboard as soon as button is clicked. | |
InputMethodManager mgr= (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); | |
mgr.hideSoftInputFromWindow(edtCity.getWindowToken(),0); | |
// edtCity is the EditText that has the focus and keyboard is writing in it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment