Titanium Community Questions & Answer Archive

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

flexSpace on the iPad bug - it just doesn't work.

The following code works on an iPhone but on the iPad using either 1.2 or 1.3 it doesn't.

var action = Titanium.UI.createButton({
    systemButton:Titanium.UI.iPhone.SystemButton.ACTION,
});

var left = Titanium.UI.createButton({
    //image:'../images/icon_arrow_left.png';
    systemButton:Titanium.UI.iPhone.SystemButton.REWIND,
});

var play = Titanium.UI.createButton({
    //image:'../images/icon_play.png',
    systemButton:Titanium.UI.iPhone.SystemButton.PLAY,
})

var pause = Titanium.UI.createButton({
    systemButton:Titanium.UI.iPhone.SystemButton.PAUSE,
});

var right = Titanium.UI.createButton({
    //image:'../images/icon_arrow_right.png';
    systemButton:Titanium.UI.iPhone.SystemButton.FAST_FORWARD,
});

var thumbnail = Titanium.UI.createButton({
    image:'../images/icon_thumbnails.png',
});


var bottomBarPlay = Titanium.UI.createToolbar({
    items:[action,flexSpace,left,flexSpace,play,flexSpace,right,flexSpace,thumbnail],
    bottom:0,
    borderTop:false,
    borderBottom:false,
    barColor: '#000',
    opacity: 0.6,
});

win.add(bottomBarPlay);

Is this a known bug?

— asked May 26th 2010 by Phi Chong
  • bug
  • flexspace
  • ipad
  • iphone
  • toolbar
0 Comments

3 Answers

  • I am using flexSpace on a toolbar in an iPad app just fine. I have it defined with:

    var flexSpace = Titanium.UI.createButton({
        systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
    });
    
    — answered May 26th 2010 by Jackson Miller
    permalink
    0 Comments
  • flexSpace is just another button. You need to define it first. If you have, it would help to include it in the code listing. :-)

    — answered May 26th 2010 by Damien Elmes
    permalink
    0 Comments
  • Yes sorry, I do have it included.

    — answered May 26th 2010 by Phi Chong
    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.