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

后端 未结 28 1312
南笙
南笙 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:58

    I was struggling for a while with this problem. Some of the solutions worked however some of my views where still being pushed up while others weren't... So it didn't completely solve my problem. In the end, what did the job was adding the following line of code to my manifest in the activity tag...

    android:windowSoftInputMode="stateHidden|adjustPan|adjustResize"
    

    Good luck

提交回复
热议问题