Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun AppCompatActivity.hideKeyBoard(){
- val view = this.currentFocus
- if (view != null) {
- val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
- inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
- }
Add Comment
Please, Sign In to add comment