Titanium Community Questions & Answer Archive

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

Background defaults to black

I've tried setting a background image using



var index = Ti.UI.createWindow({

However for some strange reason it defaults to a blackscreen. Even if I attempt to take a step back and change the color to #fff the background is still black…

— asked October 8th 2010 by Joe Irvine
  • background
  • backgroundimage
  • black
  • setbackgroundimage

1 Answer

  • Accepted Answer

    If you are trying to set the background of the main window of the app you must first get the window context by using win = Titanium.UI.currentWindow or if you are using the tabGroup win = Titanium.UI.currentTab. Then you can set the background color using win.backgroundColor = #fff or win.backgroundImage.

    — answered October 8th 2010 by Kevin Berry
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.