android中关闭软键盘

/**隐藏软键盘**/
        View view = getWindow().peekDecorView();
        if (view != null) {
            InputMethodManager inputmanger = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
            inputmanger.hideSoftInputFromWindow(view.getWindowToken(), 0);
        }

 

posted @ 2013-11-16 18:03  fighter  阅读(30492)  评论(1编辑  收藏  举报