{ "id": "61461", "key": "TIMOB-829", "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": "11239", "name": "Release 1.6.0 M06", "archived": true, "released": true, "releaseDate": "2011-01-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:22.000+0000", "created": "2011-04-15T02:37:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:22.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 problem is that the Activity that creates the menu isn't\nalways the current activity that has access to the menu.

{html}", "attachment": [], "flagged": false, "summary": "Android: Menu isn't visible/doesn't work for tabbed windows.", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124148", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Click FAIL re-assigning to me instead of Jeff.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:37:20.000+0000", "updated": "2011-04-15T02:37:20.000+0000" }, { "id": "124149", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Reports of it's operation being intermittent as well even with\nsingle Windows.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:37:21.000+0000", "updated": "2011-04-15T02:37:21.000+0000" }, { "id": "124150", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This may no longer be valid.

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

This is eons old and the menu system has changed for the better\nsince then. I see no problem with menus in tabbed window contexts.\nMy test case app.js, win1.js and win2.js:

\n

app.js:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar tabGroup = Titanium.UI.createTabGroup();\nvar win1 = Titanium.UI.createWindow({  \n    title:'Tab 1',\n    backgroundColor:'#fff',\n    url: 'win1.js'\n});\nvar tab1 = Titanium.UI.createTab({  \n    icon:'KS_nav_views.png',\n    title:'Tab 1',\n    window:win1\n});\n\nvar win2 = Titanium.UI.createWindow({  \n    title:'Tab 2',\n    backgroundColor:'#fff',\n    url: 'win2.js'\n});\nvar tab2 = Titanium.UI.createTab({  \n    icon:'KS_nav_ui.png',\n    title:'Tab 2',\n    window:win2\n});\n\ntabGroup.addTab(tab1);  \ntabGroup.addTab(tab2);  \ntabGroup.open();\n
\n

win1.js:

\n
\nvar win = Ti.UI.currentWindow;\n\nvar activity = Ti.Android.currentActivity;\nactivity.onCreateOptionsMenu = function(e) {\n    var m = e.menu.add({title: 'Win 1 Item 1'});\n    m.addEventListener('click', function(){alert('Win 1 Item 1 click');});\n};\nwin.add(Ti.UI.createLabel({text: 'Press menu and you should see \"Win 1 Item 1\"'}));\n
\n

win2.js:

\n
\nvar win = Ti.UI.currentWindow;\n\nvar activity = Ti.Android.currentActivity;\nactivity.onCreateOptionsMenu = function(e) {\n    var m = e.menu.add({title: 'Win 2 Item 1'});\n    m.addEventListener('click', function(){alert('Win 2 Item 1 click');});\n};\nwin.add(Ti.UI.createLabel({text: 'Press menu and you should see \"Win 2 Item 1\"'}));\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:37:21.000+0000", "updated": "2011-04-15T02:37:21.000+0000" }, { "id": "124152", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:37:22.000+0000", "updated": "2011-04-15T02:37:22.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }