Android Keyboard Hide hideKeyboard(Context ctx, EditText editText)

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

Description

hide Keyboard

License

Open Source License

Declaration

static public void hideKeyboard(Context ctx, EditText editText) 

Method Source Code

//package com.java2s;

import android.content.Context;

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

public class Main {
    static public void hideKeyboard(Context ctx, EditText editText) {

        InputMethodManager imm = (InputMethodManager) ctx
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);

    }//from   w ww.  ja  v  a 2 s.c  om
}

Related

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