Latest posts by Sana Modi (see all)
- 80s Happy Birthday Song Download - January 4, 2023
- Traditional Happy Birthday Song Download - December 28, 2022
- The Best VPN For Netflix-2022 - December 17, 2022
Last Updated on November 10, 2022 by Humera hallari
This code will hidden your keyboard in your Android device while use this. You can just copy paste this kotlin command in your android program.
//Hide our Keyboard fun hideMyKeyboard(){ val view = this.currentFocus if (view != null){ val hideMe = getSystemService( Context.INPUT_METHOD_SERVICE) as InputMethodManager hideMe.hideSoftInputFromWindow(view.windowToken, 0) } //else window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN) }
How to use, just call:
hideMyKeyboard()