{ "id": "63517", "key": "TIMOB-2885", "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-17T02:00:21.000+0000", "created": "2011-04-15T03:32:02.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "release-1.6.0", "reported-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:00: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": "{html}

Problem

\n

app:// paths do not work for options menu icon paths.

\n

Sample Code

\n

app.js creates a heavyweight window pointing to\nmainwindow.js:

\n
\nTitanium.UI.createWindow({
\n
\n\n\n
\n
\n
\nnavBarHidden: true,\nbackgroundColor: '#fff',\nurl: 'mainwindow.js',\nexitOnClose: true\n
\n
\n\n\n
\n}).open();\n
\n

mainwindow.js makes a very simple options menu, setting the icon\nto one of the icons included by default in new projects:

\n
\nTitanium.Android.currentActivity.onCreateOptionsMenu = function(e) {
\n
\n\n\n
\n
\n
\ne.menu\n        .add({title: 'Menu Item '})\n        .setIcon('app://KS_nav_ui.png');\n
\n
\n\n\n
\n};\n
\n

Trace Level Log

\n

I did not see anything relevant in the log, but it is attached\nanyway.

\n

Tested On

\n

Titanium Mobile 1.6.0 (Jan 19, 2011)
\nBROKEN on Android Simulator 2.2

\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/60941

{html}", "attachment": [ { "id": "18233", "filename": "menuiconswithapppathtrace.rtf", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-04-15T03:32:02.000+0000", "size": 30329, "mimeType": "text/rtf" } ], "flagged": false, "summary": "Android: Menu icons don't accept app:// paths", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "129620", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Now that the menu support is in the initial context, the test\ncode can be. I set the icon in onPrepareOptionsMenu to\nmake debugging easier. The effect is the same.

\n
\n\nvar mi = null;\nTitanium.Android.currentActivity.onCreateOptionsMenu = function(e) {\n    mi = e.menu.add({title: 'Menu Item '});\n};\nTitanium.Android.currentActivity.onPrepareOptionsMenu = function(e) {\n    mi.setIcon('app://KS_nav_ui.png');\n}\n
{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:02.000+0000", "updated": "2011-04-15T03:32:02.000+0000" }, { "id": "129621", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

should be in M06

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

Commit hook didn't fire \ncommit

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

verified working on Nexus S / 2.3.2

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:03.000+0000", "updated": "2011-04-15T03:32:03.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }