强制关闭键盘

InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(getActivity().INPUT_METHOD_SERVICE);

if (imm.isActive()) {

imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT,InputMethodManager.HIDE_NOT_ALWAYS);

}

原文地址:https://www.cnblogs.com/ywtk/p/4146502.html