phonegap+jquerymobile:页面跳转出现白屏的解决方案
来源:互联网 发布:淘宝原单尾货好的店铺 编辑:程序博客网 时间:2024/05/19 23:05
用phonegap+jquerymobile开发android程序时,不同的page跳转出现了白屏,很难看,也影响了用户体验。
1.对此jquerymobile官方给出的解决方案是:
Important: Some platforms currently have issues with transitions. We are working on a solution to solve the problem for everyone. If you are experiencing flickers and flashes during or at the end of a transition we suggest the following workaround.
Please note that this workaround should be throughly tested on the target platform before deployment. This workaround is known to cause performance issues, and browser crashes on some platforms especially Android. Add the following code to your custom css.
.ui-page { -webkit-backface-visibility: hidden; }
http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html
2.如果不行,或者出现其他问题,可以尝试一下
// 加载jQuery<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>// 加载一段js(见下文)<script type="text/javascript" src="mobile/js/mobile-site-custom-jqm-defaults.js"></script>// 加载 jQuery Mobile<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>// 加载你自己的<span class="wp_keywordlink"><a target=_blank href="http://www.xuebuyuan.com/" title="代码" target="_blank">代码</a></span><script type="text/javascript" src="mobile/js/script.js"></script>
其中mobile-site-custom-jqm-defaults.js内容如下
$(document).bind("mobileinit", function(){ $.extend( $.mobile , { defaultPageTransition: 'none' });});
3.如果上方法都不可行,还可以尝试一下关闭android的硬件加速
在androidmenifest.xml中设置
<application android:label="@string/app_name0" android:allowClearUserData="false" android:icon="@drawable/logo" android:logo="@drawable/logo" android:name="com.xx.xx" android:hardwareAccelerated="false">
- phonegap+jquerymobile:页面跳转出现白屏的解决方案
- phonegap+jquerymobile:页面跳转出现白屏的解决方案
- JQueryMobile页面跳转参数的传递解决方案
- JQueryMobile页面跳转参数的传递解决方案
- JQueryMobile页面跳转参数的传递解决方案
- JQueryMobile页面跳转参数的传递解决方案
- {HTML5}JQueryMobile页面跳转参数的传递解决方案
- HTML5 JQueryMobile页面跳转参数的传递解决方案
- {HTML5}JQueryMobile页面跳转参数的传递解决方案
- jQuerymobile 的页面跳转 原理
- JqueryMobile页面跳转传值
- jquerymobile 页面跳转闪屏问题并且引入动画效果
- jqueryMobile+phoneGap
- jquerymobile页面跳转和参数传递
- jquerymobile页面跳转和参数传递
- jquerymobile页面跳转和参数传递
- jquerymobile页面跳转和参数传递
- jquerymobile页面跳转和参数传递
- ‘Git Clone時 Agent admitted failure to sign using the key.的解
- ARP局域网攻击
- Android加速度传感器实现微信“摇一摇”
- Java Web开发之详解JSP .
- AtomicBoolean应用举例
- phonegap+jquerymobile:页面跳转出现白屏的解决方案
- 什么是POI
- rsync安装
- 戴着面具的复仇者 —— 揭秘:激进黑客组织“匿名者
- 编译错误syntax error : missing ';' before 'type'原因探寻
- java常用类库:国际化&处理动态文本示例
- 算法:一维最近对问题
- 《数据挖掘概念与技术》学习笔记
- 在64位Windows8系统下编写并调试汇编程序