Titanium Community Questions & Answer Archive

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

tabGroup restores initial tab order on startup

Hi. If you have more than 5 tabs, you can see "More" tab and an Edit button where you can manage tabs as you like, but when you close the app, tabgroup restores initial tabs order. That means you should rearrange all tabs manually every time you use the app.
Any thoughts?

— asked March 17th 2010 by Vitali Virulaine
  • tabgroup
0 Comments

7 Answers

  • Hi,
    You can store the order of tabs in an array using Ti.App.Properties.setList() and when your app opens read the list first using Ti.App.Properties.getList() and then construct your tab group as you iterate through this list.
    Regards
    Mark

    — answered March 17th 2010 by Mark Poston
    permalink
    0 Comments
  • it's not possible, because if you rearrange tabs in Manage mode, it doesn't affect to actual tabs, i cannot get current order of the tabs - it is always the same like was created.

    tabGroup.tabs[0].title will be same if you drag last table to 1st place

    — answered March 17th 2010 by Vitali Virulaine
    permalink
    0 Comments
  • OK. Would the zIndex property of a tab give you the order? I did a quick test and it doesn't seem to return anything. It is supposed to return an integer.
    A possible bug?
    Regards
    Mark

    — answered March 17th 2010 by Mark Poston
    permalink
    0 Comments
  • Well, as I understand zIndex is actual when you have other objests above the current objects for example new window above the tab, like depth. API docs say "zIndex int the z index position relative to other sibling views".
    I don't see any way to get current tabs order. That makes totally useless of tabs arranging. They will restore in initial order

    — answered March 17th 2010 by Vitali Virulaine
    permalink
    0 Comments
  • Mark – this lets you save and restore the order, but how do you determine the order in the first place? The comments above are saying that there doesn't appear to be any way to ask the tabs what order they're in – even after moving them they report that they're still in the original order that you created them in.

    — answered March 18th 2010 by Rob Cameron
    permalink
    0 Comments
  • So.. is this a bug? Because youtube app restores saved order of the tabs. Is this a system function?

    — answered March 18th 2010 by Vitali Virulaine
    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.