简体   繁体   English

jQuery Mobile PhoneGap应用在启动时闪烁

[英]jQuery Mobile PhoneGap App flickers on startup

I have a jQuery Mobile PhoneGap app that loads all of my pages fine, except for then my app starts up. 我有一个jQuery Mobile PhoneGap应用程序,可以正常加载所有页面,但我的应用程序可以启动。
The application shows a screen that says Phone gap IPhone non-retina and then shows all of the pages I have created on one screen before my application starts. 该应用程序显示一个屏幕,显示“电话间隙iPhone非视网膜”,然后在我的应用程序启动之前在一个屏幕上显示我创建的所有页面。 I load the stylesheets scripts and html body dynamically in a java script file. 我将样式表脚本和html主体动态加载到Java脚本文件中。
Is this a problem that would be occurring on my end, phone gaps end, or JQM end? 这是我端,电话空档端或JQM端会发生的问题吗? I will supply code if need be. 如果需要,我将提供代码。 I am using JQM 1.2.0 JQuery 1.8 and JQM 1.2.0 css 我正在使用JQM 1.2.0 JQuery 1.8JQM 1.2.0 css

The flicker happens between the splash page and my first page load.I use this javascript to load the pages into my index.html 闪烁发生在初始页面和我的第一页加载之间。我使用此javascript将页面加载到我的index.html中

javascript: JavaScript的:

       $("body").load(remoteURL + "body.html?v="+getTimeStamp(),function()
       {
          loadPage();
       }

It take some time, for all scripts to load and your page to set up. 加载所有脚本和设置页面需要一些时间。 You can go to the Phonegap.plist and disable the AutoHideSplashScreen and hide the splash screen from javascript, once the page is fully loaded with: 页面完全加载后,您可以转到Phonegap.plist并禁用AutoHideSplashScreen,并从javascript隐藏启动屏幕:

navigator.splashscreen.hide();

This fixed the problem for me. 这为我解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM