{ "id": "63861", "key": "TIMOB-3229", "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:40:03.000+0000", "created": "2011-04-15T03:40:00.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "focus", "release-1.7.0", "reported-1.6.0", "rplist", "tabGroup", "tabgroup", "tabs" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T19:30:40.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}

Focus events are not firing on tab focus events.

\n

Tested with 1.6 and Android 2.2.1 on device.

\n

Ticket Reference: http://developer.appcelerator.com/helpdesk/view/75811

\n

Test Code:

\n
\n\nTitanium.UI.setBackgroundColor('#000');\n\nvar tabGroup = Titanium.UI.createTabGroup();\n\nvar win1 = Titanium.UI.createWindow({  \n    title:'Tab 1',\n    backgroundColor:'#fff'\n});\nvar tab1 = Titanium.UI.createTab({  \n    icon:'KS_nav_views.png',\n    title:'Tab 1',\n    window:win1\n});\n\nvar label1 = Titanium.UI.createLabel({\n    color:'#999',\n    text:'I am Window 1',\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\n    textAlign:'center',\n    width:'auto'\n});\n\nwin1.add(label1);\n\nvar win2 = Titanium.UI.createWindow({  \n    title:'Tab 2',\n    backgroundColor:'#fff'\n});\nvar tab2 = Titanium.UI.createTab({  \n    icon:'KS_nav_ui.png',\n    title:'Tab 2',\n    window:win2\n});\n\nvar label2 = Titanium.UI.createLabel({\n    color:'#999',\n    text:'I am Window 2',\n    font:{fontSize:20,fontFamily:'Helvetica Neue'},\n    textAlign:'center',\n    width:'auto'\n});\n\nwin2.add(label2);\n\ntab2.addEventListener('focus', function(){\n\nalert('Focus');\n});\n\ntabGroup.addTab(tab1);  \ntabGroup.addTab(tab2);  \n\ntabGroup.open();\n
{html}", "attachment": [], "flagged": false, "summary": "Android: Tab focus event doesn't fire", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130342", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Fixed tags.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:40:01.000+0000", "updated": "2011-04-15T03:40:01.000+0000" }, { "id": "130343", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Isn't this the \"job\" of tabGroup's focus event? There is no\nfocus event in our tab documentation. Instead, we have tabGroup\nfocus/blur such as this:

\n
\ntabGroup.addEventListener('focus', function(e) {\n  // e.index contains the index of the tab that just gained focus.\n  // e.previousIndex contains the index of the tab that just lost focus.\n});\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:40:02.000+0000", "updated": "2011-04-15T03:40:02.000+0000" }, { "id": "130344", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Correct state of the ticket is invalid.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:40:03.000+0000", "updated": "2011-04-15T03:40:03.000+0000" }, { "id": "130345", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Adding missing tag.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:40:03.000+0000", "updated": "2011-04-15T03:40:03.000+0000" }, { "id": "408475", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closed as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T19:30:40.000+0000", "updated": "2017-03-02T19:30:40.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }