Androidのキーボードポップアップ表示と非表示

 //弹出软键盘
        InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
        inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);


 //隐藏软键盘
                InputMethodManager inputMgr = (InputMethodManager) context
                        .getSystemService(Context.INPUT_METHOD_SERVICE);
                inputMgr.toggleSoftInput(InputMethodManager.HIDE_NOT_ALWAYS, 0);
公開された184元の記事 ウォン称賛70 ビュー370 000 +

おすすめ

転載: blog.csdn.net/qq_31939617/article/details/103929691