{ "id": "63280", "key": "TIMOB-2648", "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": "11236", "name": "Release 1.6.0 M03", "archived": true, "released": true, "releaseDate": "2011-01-03" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T03:25:49.000+0000", "created": "2011-04-15T03:25:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T18:20:17.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}
Android options menu hangs/crashes
\ntested Ti 1.5.1 Android sim 2.1API's
\nrefrence HelpDesk ticket
\nhttp://developer.appcelerator.com/helpdesk/view/61351
app.js
\nvar tabGroup = Titanium.UI.createTabGroup();\nvar win1 = Titanium.UI.createWindow({
\n
\n
\n\n\n
\n
\n\nurl: 'main/menu.js',\ntitle:'Tab 1'
\n
\n\n\n\n\n
\n});\nvar tab1 = Titanium.UI.createTab({
\n\n\n
\nicon:'KS_nav_views.png',\ntitle:'Tab 1',\nwindow:win1
\n
\n\n\n\n\n
\n});\n\n
\ntabGroup.addTab(tab1);
\ntabGroup.open();\n
menu.js
\nvar win = Ti.UI.currentWindow;\nvar activity = Ti.Android.currentActivity;
\n
\n\n\n
\nvar menu = null;\nvar item1 = null;
\n
\n\n\n
\nvar l1 = Ti.UI.createLabel({
\n
\n\n\n
\n
\n\ncolor : 'white',\ntext : ' YACK ',\nleft : 10, top : 10, height : 80, right : 10
\n
\n\n\n\n\n
\n});\nwin.add(l1);\n\n
\nTitanium.API.info('create activity');\nactivity.onCreateOptionsMenu = function(e){\n\n
\nmenu = e.menu;\n\nitem1 = menu.add({title: 'PhotoGallery'});\n//item1.setIcon("KS_nav_views.png");\nitem1.AddEventListener('click', function() {\n Titanium.API.info('gotoGallery');\n});
\n
\n\n\n\n
\n};\n
Matt,
\nYour (and the client's) code calls \"AddEventListener\" with a\ncapital A, which doesn't exist. If you dig into the Trace level\nlog, you'll see that it is hanging because it hit an exception when\nit is creating the options menu.
\nFix that, and everything works. This bug is invalid.