android 关闭软键盘

/**
     * 关闭软键盘
     */
    public static void hideInputMethod(Context context, View view) {
        InputMethodManager imm = (InputMethodManager)
                context.getSystemService(Context.INPUT_METHOD_SERVICE);
        if (imm != null) {
            imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
        }
    }

  

posted on 2016-01-28 16:42  Sun_Yang_  阅读(231)  评论(0编辑  收藏  举报

导航