How to i disable the keyboard when a button is pressesd.
+2
A:
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);
Rahul
2010-08-24 05:38:46
A:
you can also use this code on button click event
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
Kandhasamy
2010-08-24 06:24:22