[TIMOB-2759] Android: menu icons with "app://" paths do not fetch resource images
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M04 |
Components | Android |
Labels | android, defect, release-1.6.0, reported-1.5.1, rplist |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:28:49.000+0000 |
Updated | 2011-04-17T02:00:00.000+0000 |
Description
cf helpdesk http://developer.appcelerator.com/helpdesk/view/60941">http://developer.appcelerator.com/helpdesk/view/60941
cf related #2627
To reproduce:
app.js
Titanium.UI.setBackgroundColor('#000');
Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#fff',
fullscreen: true,
exitOnClose: true,
url: 'win.js'
}).open();
Then make this win.js:
var win = Ti.UI.currentWindow;
Ti.Android.currentActivity.onCreateOptionsMenu = function(e) {
var m1 = e.menu.add({
itemId : 1,
groupId : 0,
order : 0,
title: 'I am a menu item'
});
m1.setIcon("app://images/test.png");
};
Then ...
- Create Resources/android/images/medium
- Copy KS_nav_ui.png to Resources/android/images/medium/test.png
Run the app. When the blank window comes up, press the emulator/phone menu button. You should see a menu item with an icon on it, but you will only see text on the menu item.
(from [8b2fd0e423d2fb5b7df3c72e88c92d3363d5a5cc]) [#2759 state:fixed-in-qa] Make sure app:// path resource drawables can be loaded by loadDrawable if url has not already been resolved https://github.com/appcelerator/titanium_mobile/commit/8b2fd0e423d2fb5b7df3c72e88c92d3363d5a5cc"> https://github.com/appcelerator/titanium_mobile/commit/8b2fd0e423d2...
Hey Bill - using Titanium SDK version: 1.6.0 (01/10/11 08:25 3452f06), I am failing with
I/TiFileHlpr( 336): (main) [7216,11921] app://images/test.png not found. emulator and device.
I confirmed I have the image at Resources/android/images/medium/KS_nav_ui.png and that I have any density set to true in tiapp.xml. Am I missing another step?
Thomas "app://images/test.png" != "Resources/android/images/medium/KS_nav_ui.png" it would match
"app://images/test.png" == " Resources/android/images/medium/test.png"
yup, should have noticed that. G2 (2.2) G1 (1.6) sim 2.1.