Archive for the ‘Android’ Category


How to close/hide the Android Soft Keyboard

In Android on September 26, 2011 by patrellery Tagged: ,

If you are like me, you might want to close or hide the soft keyword on your Android phone. After you are done writing in your layout using EditText, you want to close or hide the virtual Keyboard by clicking on a button (for example).

Well, stop searching for the solution. After digging here’s a little trick to fix this issue.

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);

This ill force the keyboard to be hidden when you click on a button! easy and simple!