Friday, 26 August 2011

How to Dismiss Keyboard in Android

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);

No comments:

Post a Comment