简体   繁体   中英

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.
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. I load the stylesheets scripts and html body dynamically in a java script file.
Is this a problem that would be occurring on my end, phone gaps end, or JQM end? I will supply code if need be. I am using JQM 1.2.0 JQuery 1.8 and JQM 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:

       $("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:

navigator.splashscreen.hide();

This fixed the problem for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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