Created
February 4, 2020 13:47
-
-
Save Jeff11/8e7d5b26e7b446c43b10810d9a8e94fb to your computer and use it in GitHub Desktop.
Hide keyboard
This file contains hidden or 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
| fun FragmentActivity.hideKeyboard() { | |
| currentFocus?.run { | |
| systemService<InputMethodManager>().hideSoftInputFromWindow(windowToken, 0) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment