PhoneGap的 - 科尔多瓦功能延迟非常明显慢于Android和iOS设备 [英] Phonegap - cordova is laggy and slow on android and iOS devices

查看:179
本文介绍了PhoneGap的 - 科尔多瓦功能延迟非常明显慢于Android和iOS设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用Zend Studio的我第一次的PhoneGap项目。但是,在我构建和部署,应用程序相当缓慢。双方在Android和iOS。滚动落后,如果我preSS一个按钮,它的下一个页面慢跳转。请问有什么办法可以提高它的性能呢?在此先感谢

I just now started with my first PhoneGap project using zend studio. But, after i build and deploy it, the application is quite slow. Both on android and iOS. The scrolling is lagging, and if i press a button, it's slow to goto the next page. Is there any way to improve it's performance ? Thanks in advance

推荐答案

自4.0.4版本中,有一种被称为错误的地方,如果硬件加速时,它实际上会减慢屏幕重绘事件。这就是为什么滚动速度很慢。

Since version 4.0.4, there is a known "bug" where if hardware acceleration is on, it will actually slow down screen redraw events. This is why scrolling is slow.

在三星Galaxy III和IV,帆布不会使任何东西,直到我们关闭硬件加速。一旦我们做的帆布绘画表现良好。

On the Samsung Galaxy III and IV, canvas would not render anything at all until we turned off hardware acceleration. Once we did canvas drawing performed well.

您可以关闭硬件加速您的WebView这一行的code。在你的应用程序的Java文件:

You can turn off hardware acceleration for your webview with this line of code in your app java file:

super.appView.setLayerType(WebView.LAYER_TYPE_SOFTWARE,NULL);

super.appView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);

这可以被固定为4.4(奇巧使用Chromeview而不是web视图)。

This may be fixed as of 4.4 (KitKat uses Chromeview rather than webview).

这篇关于PhoneGap的 - 科尔多瓦功能延迟非常明显慢于Android和iOS设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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