Android examples for android.view.inputmethod:InputMethodManager
hide Keyboard
import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager; public class Main { public static void hideKeyboard(Context c, View v) { InputMethodManager mgr = (InputMethodManager) c.getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromInputMethod(v.getWindowToken(), 0); }//from www . ja v a 2 s.c o m }