[AC-2956] Android imageView not displaying local images
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-02-15T13:39:07.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Chris Nelson |
Assignee | Mauro Parra-Miranda |
Created | 2012-02-09T13:45:18.000+0000 |
Updated | 2016-03-08T07:47:57.000+0000 |
Description
var self = Ti.UI.createView({
backgroundColor:'white'
});
var logo = Ti.UI.createImageView({
image:'images/logo.png',
top:'5dp',
height:'100dp',
width:'100dp',
hires:true
});
self.add(logo);
Works fine in iOS. Android returns http://pastie.org/3350840
Never had an issue with this before until I started using the common.js pattern. I searched the current issues already but most seem to be related to windows build environments.
Hello, you can solve this adding an slash: if (Titanium.Platform.name == 'android') { win.backgroundImage = '/images/home.jpg'; } Best, Mauro
That seemed to do the trick. Sorry for the silly question.
Closing as per updates from Chris.