Android: How do I prevent the soft keyboard from pushing my view up?

后端 未结 28 1323
南笙
南笙 2020-11-22 05:10

I have a vertical sliding drawer at the bottom of my app. When the soft keyboard opens, it pushes the tab for the drawer up, so it sits atop the keyboard. I actually want it

28条回答
  •  灰色年华
    2020-11-22 06:01

    The activity's main window will not resize to make room for the soft keyboard. Rather, the contents of the window will be automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing.

    android:windowSoftInputMode="adjustPan"
    

    This might be a better solution for what you desired.

提交回复
热议问题