{ "id": "63259", "key": "TIMOB-2627", "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": "11234", "name": "Release 1.6.0 M01", "archived": true, "released": true, "releaseDate": "2010-12-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:59:38.000+0000", "created": "2011-04-15T03:25:13.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2011-04-17T01:59:38.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}
To reproduce:
\napp.js
\n\nTitanium.UI.setBackgroundColor('#000');\nTitanium.UI.createWindow({ \n title:'Test',\n backgroundColor:'#fff',\n fullscreen: true,\n exitOnClose: true,\n url: 'win.js'\n}).open();
\n
\nThen make this win.js:
\n\nvar win = Ti.UI.currentWindow;\nTi.Android.currentActivity.onCreateOptionsMenu = function(e) {\n var m1 = e.menu.add({\n itemId : 1,\n groupId : 0,\n order : 0,\n title: 'I am first'\n });\n m1.setIcon(\"images/test.png\");\n var m2 = e.menu.add({\n itemId : 2,\n groupId : 0,\n order : 1,\n title: 'I am second'\n });\n m2.setIcon(\"KS_nav_ui.png\");\n};
\n
\nThen ...
\nRun the app. When the blank window comes up, press the\nemulator/phone menu button. You should see two menu items,\nboth of which show icons on them. But only one of them ('I am\nsecond') will have the icon.
(from [caaf86a895b9cb21256c36b1d6a6d965df233175])\n[#2627 state:fixed-in-qa] When loadDrawable calls\ngetResourceDrawable, make sure the path is a resolved url because\nthat's what getResourceDrawable expects. Change KS android_menu_1\ntest so that the first menu item uses a resource drawable (to prove\nit works) \nhttps://github.com/appcelerator/titanium_mobile/commit/caaf86a895b9...
To QA: you can test either with my app.js & win.js example\nin the description of this item, or take the latest source of KS\nand try the Base UI - Menus (android) first menu test and make sure\nthe first item in the menu has an icon on it.
Titanium SDK version: 1.6.0 (01/03/11 08:14 11dd2b6), droid 1\n(2.2.1) and G1 (1.6) verified icon appeared in menu