{ "id": "79387", "key": "TIMOB-5036", "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": "11365", "description": "Mobile 1.8.0 M12", "name": "Sprint 2011-33", "archived": true, "released": true, "releaseDate": "2011-08-22" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-08-17T13:57:06.000+0000", "created": "2011-08-17T13:16:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:21.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": "Event listener for 'android:home' is not working.\r\n\r\n1. Run the code below\r\n{code}\r\nTi.UI.setBackgroundColor('#000');\r\n\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor:'white'\r\n});\r\nvar tab1 = Ti.UI.createTab({\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n color:'#999',\r\n text:'click me',\r\n top:20\r\n});\r\nwin1.add(label1);\r\n\r\nlabel1.addEventListener('click', function(){\r\n var winHeavy = Ti.UI.createWindow({\r\n title:'Heavywight Window',\r\n backgroundColor:'blue',\r\n fullscreen:false // this causes the window to be heavyweight\r\n });\r\n\r\n winHeavy.addEventListener('android:home', function(e) {\r\n Ti.API.info(\"Pressing home Will Not Close The Activity/Window\");\r\n });\r\n var label2 = Ti.UI.createLabel({\r\n color:'white',\r\n text:'Pressing the back button will test the Android back button event. Click this label to close this heavyweight window',\r\n top:20\r\n });\r\n winHeavy.add(label2);\r\n winHeavy.open();\r\n});\r\nvar win2 = Ti.UI.createWindow({\r\n title:'Tab 2',\r\n backgroundColor:'green'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\ntabGroup.open();\r\n\r\n{code}\r\n\r\n2. 'android:search' and 'android:back' are working as expected.", "attachment": [], "flagged": false, "summary": "Android: Event listener 'android:home' not working", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 1.7.2 and Android 2.2", "comment": { "comments": [ { "id": "163228", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We do not document support of {{android:home}} and we do not support it in the [code](https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/org/appcelerator/titanium/TiBaseActivity.java#L402) it was intentionally not supported.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-17T13:57:06.000+0000", "updated": "2011-08-17T13:57:06.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }