{ "id": "63063", "key": "TIMOB-2431", "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": "11237", "name": "Release 1.6.0 M04", "archived": true, "released": true, "releaseDate": "2011-01-10" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:05.000+0000", "created": "2011-04-15T03:19:33.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "event", "open", "release-1.6.0", "tabGroup", "tabgroup" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:59:05.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}

The open event is never triggered in Android.

\n

When you use this code nothing happens:

\n
\nvar win1 = Ti.UI.createWindow({});\nvar win2 = Ti.UI.createWindow({});\n\nvar tabGroup = Ti.UI.createTabGroup({\n    \n});\n\nvar tab = Titanium.UI.createTab({\n    window:win1,\n    title:'tab1'\n});\n\n\nvar tab2 = Titanium.UI.createTab({\n    window:win2,\n    title:'tab2'\n});\n\n\ntabGroup.addTab(tab2);\ntabGroup.addTab(tab);\n\ntabGroup.addEventListener('open', function(){\n    Ti.API.error('tapGroup should be open!');\n});\n\ntabGroup.addEventListener('focus',function(){\n    Ti.API.error('Event triggered!');\n});\n\ntabGroup.open();\n
{html}", "attachment": [ { "id": "18147", "filename": "ticket2431.zip", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:19:35.000+0000", "size": 4093173, "mimeType": "application/zip" } ], "flagged": false, "summary": "Anroid: tabGroup open event not triggered", "creator": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128438", "author": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

responsible:\"Don Thorp\"

{html}", "updateAuthor": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:36.000+0000", "updated": "2011-04-15T03:19:36.000+0000" }, { "id": "128439", "author": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[responsible:\"Don Thorp\"]

{html}", "updateAuthor": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:36.000+0000", "updated": "2011-04-15T03:19:36.000+0000" }, { "id": "128440", "author": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[tagged:android tagged:tabGroup tagged:event tagged:open]

{html}", "updateAuthor": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:37.000+0000", "updated": "2011-04-15T03:19:37.000+0000" }, { "id": "128441", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

You'll probably want to use open on the windows, not the tab\ngroup as a workaround. Windows are lazily loaded.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:37.000+0000", "updated": "2011-04-15T03:19:37.000+0000" }, { "id": "128442", "author": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The window event is triggered before the tabgroup is shown. So\nthis isn't a solution for me.

{html}", "updateAuthor": { "name": "jacobvandam", "key": "jacobvandam", "displayName": "Jacob van Dam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:38.000+0000", "updated": "2011-04-15T03:19:38.000+0000" }, { "id": "128443", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Triage please.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:38.000+0000", "updated": "2011-04-15T03:19:38.000+0000" }, { "id": "128444", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

(from [894bbc962dd88319c4d9eb100c1ff141f0885cea])\n[#2431 state:fixed-in-qa] Fire open event when\nTabGroup is opened.

\n

Added firing of open event to handlePostOpen()
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/894bbc962dd8...

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:19:38.000+0000", "updated": "2011-04-15T03:19:38.000+0000" }, { "id": "128445", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Please verify the fix with the attached app which just wraps the\nabove example code.

\n

Upon launching, you should see both events received in the\nlog.

\n

Thanks
\nOpie

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T03:19:38.000+0000", "updated": "2011-04-15T03:19:38.000+0000" }, { "id": "128446", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.6.0 (01/10/11\n08:25 3452f06) g1 (1.6) and droid 1 (2.2.1) emulator running 2.1.\nThanks for test content!

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:19:39.000+0000", "updated": "2011-04-15T03:19:39.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }