Reputation: 909
So I'm trying to view image in appcelerator android app, but I always get either image that fills whole screen, or image that has right aspect ration, but is not stretched to full width.
This code should show image stretched to full width, but keep aspect ratio, but it does not.
var designView = Ti.UI.createView({
width:Ti.UI.FILL,
backgroundColor:"#042D40"
});
Upvotes: 0
Views: 467
Reputation: 24815
You should set the height too!
var designView = Ti.UI.createView({
width:Ti.UI.FILL,
height: Ti.UI.SIZE,
backgroundColor:"#042D40"
});
Also, you should use ImageView
for an image. So use the same size
properties for the ImageView
Upvotes: 1