Titanium Community Questions & Answer Archive

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

<statusbar-style> node

I've the following tiapp.xml:

<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<description>Test examples</description>
<copyright>2010 by glopes</copyright>

I want to change the style of statusBar from default to opaque_black and i thought that node called statusbar-style was enough to do that. But it not works, someone have any idea how can i do that??

Im using titanium sdk 1.3.0 and iphone sdk 3.1.3

Gilliard Alan.

— asked June 14th 2010 by Gilliard Lopes
  • iphone
  • statusbar-style
  • tiapp.xml

4 Answers

  • in your tiapp.xml change this:


    to this:


    and you'll get the black statusbar. I can't believe how long it took me to find this. I hope it helps someone else. Appcelerator should really post this somewhere.

    — answered November 11th 2010 by Glen McPherson
    • Using opaque worked perfectly. Trying to use Titanium.UI.iPhone.StatusBar.OPAQUE_BLACK didn't work in tiapp.xml

      — commented October 12th 2011 by Harry Park
    • thanks

      — commented March 19th 2012 by Ding Hua
    • thanks much!

      — commented July 16th 2012 by Mickey Asavanant
  • Try this


    I'm not sure but you might need to set this for each window you have in your app.

    — answered June 15th 2010 by Dan Tamas
    1 Comment
    • I put this in my app.js file and it changes when the splash screen loads. I also have it set in my xml file.


      — commented November 11th 2010 by Jeffrey Messick
  • actually you do the right thing. But since the tiapp.xml is not copied into the build dir you can't see any effects. Delete the iPhone Build dir and recompile.


    — answered June 12th 2011 by Stefan Klefisch
  • Hello Daniel, i tried it before and, in fact, the statusBar changed to black and you not need to set this for each window, it's affect all windows.

    But the problem is on the inicialization because the splash screen has statusBar color = gray (default). After the splash screen is showed, this command (setStatusBarStyle) is called and the statusBar color's is changed.
    You can see the statusBar changing it's color from gray to black and it causes a "blink" effect.

    if someone knows how can i adjust it…

    Thanks for your support.

    — answered June 15th 2010 by Gilliard Lopes
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.