I have one button and edittext. I want to close my soft keyboard when user complete input in edittext and press button.
Or any guide or reference link for it.
Call this function to hide the system keyboard:
fun View.hideKeyboard() {
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(windowToken, 0)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With