Hi,
I have a imageView with a size of 244 height and auto width.
var photosView = Ti.UI.createImageView({ left: 0, right: 0, height : 244, top : 40, visible: true, canScale: false, image: images[win.openId].imageURL, zIndex: 1 });When a portrait image is shown on the iPhone, the aspect fill is good, on the android it's stretched.
The image is an URL image of the internet.
Is there a workaround for it?
Thank you in advance.
Louis
2 Answers
Accepted Answer
Try setting the actual width to auto, rather than letting Titanium do it itself (Which, on Android, it seems very bad at doing.) Such as:
var photosView = Ti.UI.createImageView({ left: 0, right: 0, height : 244, top : 40, visible: true, width: 'auto', canScale: false, image: images[win.openId].imageURL, zIndex: 1 });
Don't use left and right properties together. If you, for example, define "View" with properties left:0, right:0 and width: 10, that will make "View"'s width '100%' effectively and real defined width won't be respected. Use just one of those properties, also top and bottom properties have same issue.
Your Answer
Think you can help? Login to answer this question!