Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

When adding a webView a white flash appears, how do I stop it?

On the ipad is there a way to stop the split second white flash that happens when a new web view is envoked? EG if I do this there will be a little white flash before the content loads.

var webView = Titanium.UI.createWebView({url:'index.html'});
var appWin = Titanium.UI.createWindow({fullscreen: true });
appWin.add(webView);
appWin.open();
— asked May 6th 2010 by Justin Vincent
  • flash
  • webview
  • white
0 Comments

2 Answers

  • Accepted Answer

    To build on what @Ackman said, you could also put this into your app.js and make it the default background for all windows:

    Ti.UI.setBackgroundColor('#000');
    

    It works on iPhone, assuming it does on iPad too.

    — answered May 6th 2010 by Dan Giulvezan
    permalink
    0 Comments
  • try

    var webView = Titanium.UI.createWebView({url:'index.html'});
    
    webview.backgroundColor='black';
    
    — answered May 6th 2010 by Juan Carlos Navarro
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.