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?
7 Answers
-
Accepted Answer
Hi everyone,
i found a solution, see http://developer.appcelerator.com/question/18541/is-there-a-way-to-manage-tab-order-in-a-tab-group
-
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 -
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
-
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 -
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 -
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.
-
So.. is this a bug? Because youtube app restores saved order of the tabs. Is this a system function?