即时通讯目前使用PhoneGap的一个移动应用程序的IM发展。在我的登录页面,当我选择的文本字段,视图水平缩小时,则键盘滑了起来。这仅发生在Android和iOS的不
Im currently using phonegap for a mobile app im developing. In my Login screen, when I select a text field, the view shrinks horizontally when then keyboard slides up. This only happens for the Android and not iOS.
这涉及到我,因为我有一个底部的工具栏就是的位置是:绝对的;底部:0;
键,该工具栏被压在Android的时候,键盘显示出来。在iOS系统中,键盘只是简单地覆盖它。
This concerns me because I have a bottom toolbar that is position:absolute; bottom:0;
and this toolbar is pushed up in Android when the keyboard shows up. In iOS, the keyboard just simply overlays it.
在的AndroidManifest.xml
您的主要活动添加以下内容:
In AndroidManifest.xml
on your main activity add the following:
android:windowSoftInputMode="adjustPan"
和
android:configChanges="orientation|keyboardHidden"
在 index.html的
添加什么traumalles指出:
In index.html
add what traumalles pointed out:
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi" />