0

I have an app with ListView in it and I added search functionality to it. When I press on EditText and it opens keyboard, it pushes everything in the layout along with it.

Normal layout: enter image description here

With keyboard: enter image description here

As you can see; the ad, play button, seekbar are all pushed up along with the keyboard, but I don't want that. Is there a way I can avoid this?

I tried adding this to Manifest file:

android:windowSoftInputMode="stateUnchanged"

But that doesn't work.

4

1 回答 1

0

您可能想使用"adjustPan"

文档中:

Activity 的主窗口没有调整大小来为软键盘腾出空间。相反,窗口的内容会自动平移,因此当前焦点永远不会被键盘遮挡,用户始终可以看到他们正在输入的内容。这通常不如调整大小可取,因为用户可能需要关闭软键盘才能到达窗口的模糊部分并与之交互。

于 2013-08-28T16:49:02.223 回答