ImageView fails to load with pre-escaped URLs (TI Mobile 1.4)
It appears that using properly escaped URLs fails? For instance, this works: (notice the spaces in the URL!)
var coverArt = Titanium.UI.createImageView({
width:'300px',
height:'300px',
top:'5px',
defaultImage:'logo.png',
image:'http://codefromjames.com/radio/library/Motion City Soundtrack/Commit this to Memory/folder.jpg'
});
Titanium.API.info(coverArt.image);
mainWindow.add(coverArt);
However, this does not seem to work.
var coverArt = Titanium.UI.createImageView({
width:'300px',
height:'300px',
top:'5px',
defaultImage:'logo.png',
image:'http://codefromjames.com/radio/library/Motion%20City%20Soundtrack/Commit%20this%20to%20Memory/folder.jpg'
});
Titanium.API.info(coverArt.image);
mainWindow.add(coverArt);
1 Answer
-
Accepted Answer
James
You would need to unescape it to use it, ie:
image:unescape('http://codefromjames.com/radio/library/Motion%20City%20Soundtrack/Commit%20this%20to%20Memory/folder.jpg')