Java tutorial
//package com.java2s; import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager; public class Main { /** * To hide system's keyboard. */ public static void hideSoftInput(Context appContext, View... views) { InputMethodManager inputManager = (InputMethodManager) appContext .getSystemService(Context.INPUT_METHOD_SERVICE); for (View view : views) { inputManager.hideSoftInputFromWindow(view.getWindowToken(), 0); } } }