Guest User

Untitled

a guest
May 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. fun AppCompatActivity.hideKeyBoard(){
  2. val view = this.currentFocus
  3. if (view != null) {
  4. val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
  5. inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
  6. }
Add Comment
Please, Sign In to add comment