Issue
How do I dismiss the keyboard when a button is pressed?
Solution
You want to disable or dismiss a virtual Keyboard?
If you want to just dismiss it you can use the following lines of code in your button's on click Event
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
Answered By - DeRagan
Answer Checked By - Katrina (JavaFixing Volunteer)