close keyboard android

Solutions on MaxInterview for close keyboard android by the best coders in the world

showing results for - "close keyboard android"
Lisa
22 Aug 2016
1public static void hideSoftKeyboard(Activity activity) {
2    InputMethodManager inputMethodManager = 
3        (InputMethodManager) activity.getSystemService(
4            Activity.INPUT_METHOD_SERVICE);
5    inputMethodManager.hideSoftInputFromWindow(
6        activity.getCurrentFocus().getWindowToken(), 0);
7}