{ "id": "63762", "key": "TIMOB-3130", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11247", "name": "Sprint 2011-12", "archived": true, "released": true, "releaseDate": "2011-03-28" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-13T20:28:30.000+0000", "created": "2011-04-15T03:37:40.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SupportTeam", "klist" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-13T20:28:33.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}

There currently isn't a way to access the Activity object for a\r\nTabGroup

{html}\r\n\r\nh4. HD Discussion\r\n\r\nhttp://support-admin.appcelerator.com/display/16135", "attachment": [], "flagged": false, "summary": "Android: Provide API for a TabGroup/Heavywindows/All activities in order to catch events", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130130", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "{html}

I believe I have a workaround.

\n

Workaround

\n

If you wait for one of the tab group's windows to open, you can\nuse Ti.Android.currentActivity to get at the tab group's activity.\nFor example:

\n
\nvar tabGroup = Ti.UI.createTabGroup();\nvar tmpWindow = Ti.UI.createWindow();\ntabGroup.addTab(Ti.UI.createTab({ window: tmpWindow }));\ntabGroup.addTab(Ti.UI.createTab({ window: Ti.UI.createWindow() }));\ntabGroup.open();\n\ntmpWindow.addEventListener('open', function() {\n    Ti.Android.currentActivity.addEventListener('restart', function() {\n        alert('Restarted!');\n    });\n    alert('Opened!');\n});\n
\n

In this sample, \"Ti.Android.currentActivity\" properly adds the\nevent listener to the tab group's activity, and allows the\n\"restart\" event to be handled.

\n

That having been said, it would be nice to be able to do\ntabGroup.activity like we can do window.activity.

\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/73401

{html}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:37:40.000+0000", "updated": "2011-04-15T03:37:40.000+0000" }, { "id": "130131", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Currently, this feature is not possible due to the kind of\nactivity that the Tab group represents. That said, a feature\nrequest will be opened for accessing activity from the tab itself\n(tab.activity).

\n

The work around that Dawson shows above set the event listener\non the currently active and open tab and is the suggested method\nfor handling this situation. As the activity changes when the tab\nchanges, the callback needs to be set again on\nTi.Android.currentActivity when the tab changes. You should also be\nable to set the listeners on Ti.Android.currentActivity the first\ntime each tab opens which would negate having to set the listeners\nagain if when the tab was selected subsequent times.

\n

#3415 spawned for feature request

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:37:41.000+0000", "updated": "2011-04-15T03:37:41.000+0000" }, { "id": "191845", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\nI provided Dawson's workaround to the customer, but some of the events are not working properly. \r\n\r\nThe customer needs to catch all the events all activities, including tabs, heavy windows and such.\r\n\r\nBEst,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-04-19T10:58:24.000+0000", "updated": "2012-04-19T10:58:24.000+0000" }, { "id": "421895", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to the time passed and lack of progress. Any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-13T20:28:30.000+0000", "updated": "2017-06-13T20:28:30.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }