从输入法服务中隐藏软键盘
我试图从 InputMethodService 中隐藏我的软键盘,但它不起作用。这是我在 onFinishInput() 方法中使用的代码:
InputMethodManager im = (InputMethodManager)
context.getSystemService(Context.INPUT_METHOD_SERVICE);
im.hideSoftInputFromWindow(mInputView.getWindowToken(), 0);
有什么想法吗?
I am trying to hide my soft keyboard from an InputMethodService, and it isn't working. Here is the code I am using in my onFinishInput() method:
InputMethodManager im = (InputMethodManager)
context.getSystemService(Context.INPUT_METHOD_SERVICE);
im.hideSoftInputFromWindow(mInputView.getWindowToken(), 0);
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下对我有用:
The following has worked for me:
您可以从清单中隐藏软键盘,试试这个:
You can hide soft keyboard from manifest , Try this one: