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

后端 未结 28 1321
南笙
南笙 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 05:48

    For Scroll View:

    if after adding android:windowSoftInputMode="stateHidden|adjustPan" in your Android Manifest and still does not work.

    It may be affected because when the keyboard appears, it will be into a scroll view and if your button/any objects is not in your scroll view then the objects will follow the keyboard and move its position.

    Check out your xml where your button is and make sure it is under your scroll View bracket and not out of it.

    Hope this helps out. :D

提交回复
热议问题