Slow page transitions on Android with hardware acceleration on

╄→尐↘猪︶ㄣ 提交于 2019-12-06 01:08:57

问题


I'm trying to run the ionic-angular-cordova-seed project on Android 4.3.1 with Cordova. One thing I've noticed is that page transitions (for example, clicking on a tab or a list item) are very slow.

I tried to disable hardware acceleration using:

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

... and it worked perfectly. But then scrolling, side menu sliding and more animations became extremely slow.

I've tried FastClick, it didn't make any difference.

I found this CSS-based solution to the problem, but I'm not familiar enough with Ionic to apply it on it. Any ideas?

Note: I'm not using any animations for page transitions.


回答1:


It seems like Ionic has made a lot of Android-related fixes that really improved performance. In addition, I've splitted my Android version into two versions: 4.4 and pre-4.4. Pre 4.4 is using cordova-android-chromeview which makes it so much faster. Even though it adds ~20 MB to the apk, it worths it.




回答2:


Since this bug seems to be very specific to Android 4.4.2 I believe this may be what we're looking for, or at least helpful: http://playlablondon.tumblr.com/post/102534909709/improving-performance-on-cordova-powered-android



来源:https://stackoverflow.com/questions/21546521/slow-page-transitions-on-android-with-hardware-acceleration-on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!