[TIMOB-2885] Android: Menu icons don't accept app:// paths
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M06 |
Components | Android |
Labels | android, defect, release-1.6.0, reported-1.6.0, rplist |
Reporter | Dawson Toth |
Assignee | Don Thorp |
Created | 2011-04-15T03:32:02.000+0000 |
Updated | 2011-04-17T02:00:21.000+0000 |
Description
Problem
app:// paths do not work for options menu icon paths.
Sample Code
app.js creates a heavyweight window pointing to
mainwindow.js:
Titanium.UI.createWindow({
navBarHidden: true,
backgroundColor: '#fff',
url: 'mainwindow.js',
exitOnClose: true
}).open();
mainwindow.js makes a very simple options menu, setting the icon
to one of the icons included by default in new projects:
Titanium.Android.currentActivity.onCreateOptionsMenu = function(e) {
e.menu
.add({title: 'Menu Item '})
.setIcon('app://KS_nav_ui.png');
};
Trace Level Log
I did not see anything relevant in the log, but it is attached anyway.
Tested On
Titanium Mobile 1.6.0 (Jan 19, 2011)
BROKEN on Android Simulator 2.2
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/60941">http://developer.appcelerator.com/helpdesk/view/60941
Attachments
File | Date | Size |
---|---|---|
menuiconswithapppathtrace.rtf | 2011-04-15T03:32:02.000+0000 | 30329 |
Now that the menu support is in the initial context, the test code can be. I set the icon in
onPrepareOptionsMenu
to make debugging easier. The effect is the same.should be in M06
Commit hook didn't fire https://github.com/appcelerator/titanium_mobile/commit/4f15971134987632d7f76585fc526b0f21dc6406"> commit
verified working on Nexus S / 2.3.2