hide System KeyBoard - Android android.view.inputmethod

Android examples for android.view.inputmethod:KeyBoard

Description

hide System KeyBoard

Demo Code

import android.content.Context;
import android.content.pm.PackageManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

public class Main{

    public static void hideSystemKeyBoard(Context mContext, View v) {
        InputMethodManager imm = (InputMethodManager) (mContext
                .getSystemService(Context.INPUT_METHOD_SERVICE));
        imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
    }/*from w w w  . j av  a2s  .c om*/

}

Related Tutorials