πŸͺ InputManager πŸͺ

Hide keyboard

val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
// ➑️ Activity
inputMethodManager.hideSoftInputFromWindow(currentFocus!!.windowToken, 0)
// ➑️ Fragment
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)