java怎么编写软键盘_安卓手机软键盘操作
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()
總結
以上是生活随笔為你收集整理的java怎么编写软键盘_安卓手机软键盘操作的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql 5.1.60.tar.gz_
- 下一篇: MySQL怎么打开explain_MyS