InputMethodManager manager =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
manager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
本文介绍了一种在应用程序中隐藏软键盘的方法。通过获取输入方法管理器并调用hideSoftInputFromWindow方法,可以有效地隐藏当前焦点窗口上的软键盘。
InputMethodManager manager =
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
manager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
833

被折叠的 条评论
为什么被折叠?