Android Keyboard Hide hideKeyBoard(View view, Activity activity)

Here you can find the source of hideKeyBoard(View view, Activity activity)

Description

hide Key Board

Declaration

public static void hideKeyBoard(View view, Activity activity) 

Method Source Code

//package com.java2s;
import android.app.Activity;

import android.content.Context;

import android.view.View;
import android.view.inputmethod.InputMethodManager;

public class Main {
    public static void hideKeyBoard(View view, Activity activity) {
        InputMethodManager imm = (InputMethodManager) activity
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
    }//  www  .  ja v a 2 s.c o  m
}

Related

  1. hideKeyboard(Context context, EditText editText)
  2. hideKeyboard(Context ctx, EditText editText)
  3. hideKeyboard(View view)
  4. hideKeyboard(EditText editText)