Titanium Community Questions & Answer Archive

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

ButtonBar / Toolbar Background Image

Is it possible to use a custom background image instead of the standard iPhone style backgrounds for either a button bar, tab bar, or toolbar?

Thanks

— asked March 12th 2010 by Garrett Langley
  • buttonbar
  • toolbar
0 Comments

6 Answers

  • John,

    Do you have an example? When I simply do:

    var bBar = Ti.UI.createButtonBar({
    backgroundImage:'main-header-bg-320.png',
    style:Titanium.UI.iPhone.SystemButtonStyle.PLAIN,
    height:40,
    bottom:0,
    labels:[{title:'Test'},{title:'Foo'},{title:'Bar'}],
    });

    The backgroundImage isn't displayed.

    Thanks

    — answered March 13th 2010 by Garrett Langley
    permalink
    0 Comments
  • I'm having a similar problem with tabs:

    var tab1 = Titanium.UI.createTab({
    icon:'KS_nav_views.png',
    title:'',
    backgroundImage: "car.png", // doesn't do anything
    window:win1,
    backgroundColor: "#f4f4f4" // doesn't do anything
    });

    And is there a way to change the background of the tab wrapper. I thought changing the background of the TabGroup but that changes the background of the whole window and not the black bar at the bottom

    — answered March 24th 2010 by Alex Grande
    permalink
    0 Comments
  • i'm having same pb : http://developer.appcelerator.com/question/8111/changing-tabbar-backgroundcolor

    hope to find how to change tabbar backgroundColor, this should be a great thing.
    i've been investigating for so long.

    — answered March 28th 2010 by Stephane Pelamourgues
    permalink
    0 Comments
  • I only tested this for the toolbar and the background image is shown.
    I set the barColor to transparent.

    var navBar = Titanium.UI.iOS.createToolbar({
        backgroundImage:'yourimage.png',
        barColor:'transparent',
        top:0
    });
    

    The ist still a gloss effect overlay on top of the image. Maybe someone knows how to get rid of this.

    — answered June 19th 2012 by Marc Boehler
    permalink
    0 Comments
  • Yes, you can use the backgroundImage property of the buttonbar.

    — answered March 12th 2010 by John Pettigrew
    permalink
    1 Comment
    • that doesn't work.

      — commented April 28th 2012 by Joris
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.