1.方法一:
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(SaleRecordActivity.this.getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);其中“SaleRecordActivity”为当前Activity
本文介绍了一种在Android应用中隐藏软键盘的方法。具体实现方式是通过获取输入法管理器服务并调用其hideSoftInputFromWindow方法来完成。这种方法适用于需要手动控制键盘显示情况的应用场景。
1.方法一:
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(SaleRecordActivity.this.getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
被折叠的 条评论
为什么被折叠?
