0

A Cordova-based app - containing only a few relatively simple / local pages - flickers somehow during launch, just after the splash screen disappears and the first jQuery-based data-role="page" page appears.

The flicker appears in the bar at the top of the screen.

For roughly a 2/10 of a second, the screen appears as if CSS not yet applied. After that, the page appears as it should, as if CSS suddenly gets applied.

Does a standard workaround exists? E.g. mark all data-role="page" pages as display:none and some tenth of a second later within

app.initialize();

make the pages visible.

Or may I somehow instruct Cordova to do that for me?

Seen on iPad 2.

SteAp
  • 11,853
  • 10
  • 53
  • 88
  • 2
    I have gotten around this by using the splashscreen plugin. I set the splash screen to show for 30 seconds by default, and then in my code after the first page render is called I call the splashscreen plugin `hide()` method. – Dawson Loudon May 22 '14 at 23:14
  • @DawsonLoudon Thx! Good hint. So the splash screen overlays the rendered page? – SteAp May 22 '14 at 23:16
  • 1
    Yes, this is also useful if you need to load your own data when the app loads and want the splash screen to wait until that is done. Otherwise the default is the hide as soon as the application is ready to present the webview, which can cause short flicker. – Dawson Loudon May 22 '14 at 23:27
  • @DawsonLoudon Why not write an answer instead of a comment? I'm happy to accept yours. – SteAp May 30 '14 at 11:22
  • Because PhoneGap issues can be very random sometimes what worked for me doesn't work for others. I like to wait and see if it worked and then if it does I add an answer. Did this solve your issue? – Dawson Loudon May 30 '14 at 15:26

0 Answers0