Titanium Community Questions & Answer Archive

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

iPad- Toolbar on top right

Is possible put a toolbar on top right of a navbar?
Like Mail App on iPad.

mail App

Thanks.
Giorgio

— asked May 19th 2010 by Giorgio Aquino
  • ipad
  • toolbar
0 Comments

5 Answers

  • i recently wrote some code to accomplish this style (close, just has button outlines)

    var buttonObjects = [
        {image:'images/icons/01-refresh.png', width:50},
        {image:'images/icons/02-switchaccounts.png', width:50}
    ];
    
    var buttonBar = Titanium.UI.createButtonBar({
        labels:buttonObjects
    });
    
    {{{target}}}.setRightNavButton(buttonBar);
    
    buttonBar.addEventListener('click', function(e){
    
        //refresh button
        if(e.index == 0){
            alert('refresh');
    
        //switch accounts
        }else if(e.index == 1){
            alert('switch accounts');
        }
    
    });
    

    hope that helps.

    — answered December 13th 2010 by Jim Carter III
    permalink
    0 Comments
  • I think this is a normal toolbar with 5 buttons, the first one being a flexspace

    — answered May 19th 2010 by Dan Tamas
    permalink
    0 Comments
  • I couldn't get a toolbar to work as a nav button. Am I doing something wrong, or does this not actually work?

    — answered September 3rd 2010 by Michael Bollman
    permalink
    0 Comments
  • I think it's possible with a tabbed button bar, but not separate buttons.

    — answered September 3rd 2010 by Kosso
    permalink
    0 Comments
  • But then they all look like buttons, not like the iPhone/iPad icons right? or is there a button style to remove all the borders?

    — answered September 3rd 2010 by Michael Bollman
    permalink
    1 Comment
    • correct. I think it;s the only way for now :\

      — commented September 3rd 2010 by Kosso
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.