{ "id": "63328", "key": "TIMOB-2696", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11257", "description": "", "name": "Sprint-2011-09", "archived": true, "released": true, "releaseDate": "2011-03-07" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T03:27:18.000+0000", "created": "2011-04-15T03:27:16.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "klist", "release-1.7.0", "reported-1.5.1", "reported-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T18:16:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}
sample of my code:
\ntabGroup.addTab(tabSession);
\ntabGroup.addTab(tabResults);
\ntabGroup.addTab(tabMessages);
\ntabGroup.addTab(tabNews);
\ntabGroup.addTab(tabSettings);
tabGroup.setActiveTab(4);
\ntabGroup.open();
tabSettings is opened as expected, but tabSession is opened too.\nThis breaks my application as when tabSession opens it downloads a\nlist. This list is then put into tabSettings instead of tabSession\nbecause it is the active window.
\nWhat I expected, and what happens in iOS, is that tabSettings is\nopened initially, and tabSession is not, until you click the\nSessions tab
\nthis is in Titanium Mobile 1.5.1
I have replicated this issue. To be more precise, and to help\nget it fixed swiftly:
\nGiven a not-yet-opened tabGroup, and two tabs (tab1, tab2),\ntabGroup.setActiveTab(tab2) will cause both tabs to be loaded, and\ncan result in the tabs contents getting loaded into the same\nview*.
\n*Tab contents will only load into the same view if you load a\nlot of data in the window. If the load is quick enough, the\nmisbehavior will not be observed. I was able to reproduce the\nstacking every time by putting several hundred labels in both of my\ntabs.
\nCalling tabGroup.setActiveTab(tab2) would cause tab1 to not be\nloaded until the user clicks it. Further, tab1 should not load on\ntop of tab2.
\nTested on clean builds of Titanium Mobile 1.5.1, and 1.6.0 from\nJan 11th 2011.
\nBROKEN on Android Simulator 2.2
\nBROKEN on Android Device Samsung Epic 4G 2.1
Attached.
\nAttached.
\nthere's another customer interested in this fix
We'll look into this, but depending on OS controls\nloading/pre-loading behavior to not change is asking for trouble.\nThe double loading should not occur though.
This behavior is actually core behavior in terms of how Android\nOS handles tabs currently.
To get around the original problem, the logic for downloading\nthe list in question should be driven via an app event once\nwhatever logic (such a login) has completed in the desired active\ntab rather than just launching due to the tab opening.