移动布局最多时显示软键盘?布局、键盘

由网友(TF的守护者)分享简介:我在与对齐底部RelativeView几个元素属性设置,当软键盘出现的元素是隐藏的软键盘。I have a few elements in a RelativeView with the align bottom attribute set, when the soft keyboard comes up the e...

我在与对齐底部RelativeView几个元素属性设置,当软键盘出现的元素是隐藏的软键盘。

I have a few elements in a RelativeView with the align bottom attribute set, when the soft keyboard comes up the elements are hidden by the soft keyboard.

我想他们动起来,这样,如果有足够的屏幕空间,他们会显示在键盘上方,或使键盘上方的部分滚动,以便用户仍然可以看到的元素。

I would like them to move up so that if there is enough screen space they are shown above the keyboard, or to make the section above the keyboard scrollable so the user can still see the elements.

对如何处理这个任何想法?

Any ideas on how to approach this?

推荐答案

是的,检查出的这篇文章对Android开发者网站它描述了框架如何处理的软键盘出现。

Yes, check out this article on the Android developers' site which describes how the framework handles the soft keyboard appearing.

android:windowSoftInputMode属性可以用来指定在每个活动的基础上发生的事情:布局是否调整大小或者是否滚动等

The android:windowSoftInputMode attribute can be used to specify what happens on a per-activity basis: whether the layout is resized or whether it scrolls etc.