0

I'm creating my app on Phonegap Build, at the current version (2.3.0) and I got two problems:

The notification and WebViewBounce (I'm trying to disable) do not work.

I tried to use on config.xml:

<preference name="webviewbounce" value="false"/>
<!-- Plugins -->
<plugins>
<plugin name="Notification" value="CDVNotification" />
</plugins>

I have tried it on iOS 6.1.2 and was not successfull. Does anyone know how to get it working?

Thanks since now.

4

2 回答 2

4

PhoneGap 的配置文件(位于 www/config.xml 中)带有此首选项设置:

<preference name="webviewbounce" value="true" />

我以为你会设置为 false 来修复,但这不起作用。经过一番挖掘后,我发现您需要DisallowOverscroll为 iOS 设置为 true,disallowOverscroll为 Android 设置为 true。所以我的配置文件现在包含:

<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="disallowOverscroll" value="true" />

涵盖所有可能发生的情况。

我还注意到我需要从我的视口元标记中删除 height=device-height 。所以在我之前:

<meta name="viewport" content="user-scalable=no, initial-scale=1, 
maximum-scale=1, minimum-scale=1, width=device-width, 
height=device-height, target-densitydpi=medium-dpi" />

我改为:

<meta name="viewport" content="user-scalable=no, initial-scale=1, 
maximum-scale=1, minimum-scale=1, width=device-width, 
target-densitydpi=medium-dpi" />

如果不这样做,我的 100% 高度会在其高度中包含状态栏(或通话状态栏稍高)。删除此值会完全删除滚动条。

overflow: auto然后,如果我需要滚动条,我会在我的应用程序中使用 div 。

于 2013-12-18T13:00:12.590 回答
1

尝试将:添加 <script type="text/javascript" src="cordova.js"></script>到您的 HTML 中。

于 2013-03-26T11:27:14.737 回答