Android Keyboard Hide hideKeyboard(Context context, EditText editText)

Here you can find the source of hideKeyboard(Context context, EditText editText)

Description

hide Keyboard

Declaration

public static void hideKeyboard(Context context, EditText editText) 

Method Source Code

//package com.java2s;

import android.content.Context;

import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;

public class Main {
    public static void hideKeyboard(Context context, EditText editText) { //
        InputMethodManager imm = (InputMethodManager) context
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
    }//from w  w  w.  j  a v  a  2  s.com
}

Related

  1. hideKeyBoard(View view, Activity activity)
  2. hideKeyboard(Context ctx, EditText editText)
  3. hideKeyboard(View view)
  4. hideKeyboard(EditText editText)
  5. hiddenKeyboard(Activity activity)