Android examples for android.view.inputmethod:InputMethodManager
close Soft Input
import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager; public class Main{ public static void closeSoftInput(Context c, View focusingView) { InputMethodManager imm = (InputMethodManager) c .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(focusingView.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN); }/*ww w. j a v a 2 s . c o m*/ }