“方向|键盘隐藏”不调用 onConfigurationChanged
我想知道键盘何时关闭,因此我使用 android:configChanges="orientation|keyboardHidden"
。我必须重写该方法 onConfigurationChanged
,但似乎什么也没有发生。我做错了什么吗?
I want to know when the keyboard is closed, so I'm using android:configChanges="orientation|keyboardHidden"
. I have to override the methodonConfigurationChanged
, but nothing seems to happen. Am I doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
观看日期,可能您有问题的解决方案,否则:
这是我对另一个相关问题所做的相同答复:有没有办法判断软键盘是否显示?
但我在这里复制了部分响应避免死链接:
这是一个特定的示例:
检查以更好地理解http://developer.android.com/guide/topics/resources/runtime-changes.html
文档中的代码:
watching the date , possibly you have a solution for your question, otherwise:
Here is the same response i made to another question related : Is there a way to tell if the soft-keyboard is shown?
but i copy a portion of the response here to avoid dead links:
Here is a specific sample:
Check for better understanding http://developer.android.com/guide/topics/resources/runtime-changes.html
Code from docs:
您是否在重写的方法中添加了
super.onConfigurationChanged(newConfig);
?Have you added
super.onConfigurationChanged(newConfig);
in the overridden method?