There are EditText and buttons in the layout that I made I want to hide my virtual keyboard when I write Edit Field and click the button What do I do?
android keyboard android-softkeyboard android-keypad android-input-method
You can control virtual keyboards with the InputMethodManager class.
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
This will allow you to hide your keyboard.
© 2024 OneMinuteCode. All rights reserved.