PhoneGap的:有没有办法来阻止调整视图中的键盘? [英] PhoneGap: Is there a way to stop the keyboard from resizing the view?

查看:135
本文介绍了PhoneGap的:有没有办法来阻止调整视图中的键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时通讯目前使用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.

推荐答案

的Andr​​oidManifest.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" />

这篇关于PhoneGap的:有没有办法来阻止调整视图中的键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆