1、InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
2、imm.hideSoftInputFromWindow(edit_text_username.getWindowToken(),0) ;
通过InputMethodManager对输入法键盘进行关闭
最新推荐文章于 2023-10-13 10:13:37 发布
本文介绍了一种在Android应用中隐藏软键盘的有效方法。通过获取InputMethodManager服务并调用hideSoftInputFromWindow方法,可以实现对软键盘显示状态的控制。
2634

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



