隐藏输入法

InputMethodManager manager = (InputMethodManager) mContext
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (((Activity) mContext).getWindow().getAttributes().softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)
manager.hideSoftInputFromWindow(((Activity) mContext).getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);

posted on 2014-07-23 11:19  lancyWang  阅读(141)  评论(0编辑  收藏  举报

导航