Titanium Community Questions & Answer Archive

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

Fade out statusbar and navbar

Hi, I want to duplicate the effect in the iPhone photogallery where the statusbar and navbar fades out after a few second.
So far I've only found a way to completely hide or show them.

How can I access them for animation ?

thanks

— asked May 25th 2010 by Mattias Svedhem
  • animation
  • fadeout
  • iphone
  • navbar
  • statusbar
0 Comments

6 Answers

  • You cannot at present access either the navbar or the status bar directly, so it is not presently possible to manipulate the opacity of either.

    You can, however, fade out the status bar as follows:

    Ti.UI.iPhone.hideStatusBar({animationStyle:Ti.UI.iPhone.StatusBar.ANIMATION_STYLE_FADE});
    

    There is at present no equivalent for the navbar.

    You might be able to construct a somewhat inelegant workaround by replacing the navbar with an image or a toolbar of your own making which you can then manipulate at will.

    That might be feasible for a window which simply shows an image but is unlikely to be feasible for anything resembling a navigation group with sub-windows.

    — answered June 24th 2011 by James K
    permalink
    0 Comments
  • There's a property delay iirc you can apply to an animation.

    — answered May 25th 2010 by David Ashwood
    permalink
    0 Comments
  • Yes, but how do I access the navbar and statusbar for animation ?
    Since I don't just want to showHide the navbar/statusbar, I want to lower the opacity.

    — answered May 25th 2010 by Mattias Svedhem
    permalink
    0 Comments
  • yeah, how do you do it?

    — answered May 25th 2010 by Peter Lum
    permalink
    0 Comments
  • Has anyone came up with any solution for this topic?

    — answered February 12th 2011 by Aaron Liu
    permalink
    0 Comments
  • Do this:

        setTimeout(function() {
            Titanium.UI.iPhone.hideStatusBar();
        }, 1000);
    

    1000 is milliseconds.. Change to whatever time you want to hide it. And to show it back, use: showStatusBar();

    This only works on iPhone.

    — answered March 21st 2011 by Daniel Tome
    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.