I'm developing an app and I really need to avoid the keyboard from resizing the layout when the keyboard is shown. I've already read TONS of posts in SO and also read about it in blogs but I can't find an answer that really works. My problem is that when the keyboards pops some views in the bottom of the screen are moved up so a lot of space is wasted with this views that are not necessary to be shown when the keyboard comes out.

So I have two possibilities or find a way that keyboard doesn't resize the layout or some kind of "keyboard is out" callback that let me hide the views that are useless when keyboard is shown. Any idea???

Help!!

Thanks a lot!

有帮助吗?

解决方案

Have you tried the

android:windowSoftInputMode="adjustPan"

in tha AndroidManifest when you declare your activity? When you set this, than the activitiy won't be resized.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top