Android Keyboard Hide hideKeyboard(EditText editText)

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

Description

hide Keyboard

Declaration

public static void hideKeyboard(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(EditText editText) {
        InputMethodManager imm = (InputMethodManager) editText.getContext()
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
    }//  ww w.ja v  a  2  s  .  c o m
}

Related

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