Android:检测软键盘打开 [英] Android: Detect softkeyboard open
本文介绍了Android:检测软键盘打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当软键盘打开时,我希望滚动视图向下滚动到底部.
When the soft keyboard opens I want a scroll view to scroll down to the bottom.
为此我可以使用:fullScroll(View.FOCUS_DOWN);
For this I can use: fullScroll(View.FOCUS_DOWN);
但是如何在软键盘打开事件触发后触发该命令?
But how do I fire that command after the soft keyboard opening event triggers?
推荐答案
Per 这篇文章 和这篇文章 在 android-developers 上,似乎不可能做你想做的事.您可能想要重新检查您的用例以了解您正在做什么.也许是 softInputMode
标志对你有用.
Per this post and this post on android-developers it doesn't seem like it's possible to do what you want. You may want to re-examine your use case for what you're doing. Maybe one of the softInputMode
flags will work for you.
这篇关于Android:检测软键盘打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文