inputMethodManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE)
隐藏活显示
inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);隐藏活显示,测试的时候显示的无效,测试机子华为荣耀
inputMethodManager.showSoftInput(ibEdit, InputMethodManager.SHOW_FORCED);inputMethodManager.hideSoftInputFromWindow(ibEdit.getWindowToken(), 0);隐藏
inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);获取打开隐藏状态,测试一直都是true,测试机子华为荣耀
inputMethodManager.isActive()