I have set width attribute of the imageView. But it is not taking up the width. It is not the aspect ratio thing. It is something else:
// Create an ImageView.
var content = Ti.UI.createView(
{
width : '100%',
height : '90%',
bottom : '0%',
});
// Create an ImageView.
var dialerImage = Ti.UI.createImageView(
{
image: '/images/dial.png',
width : '98%',
center : '51%'
});
content.add(dialerImage);
But the image never takes that width, it only takes somewhere near 60% of width. I have tried a lot of things. i.e: setting both width and height, setting height only, setting the width and/or height to Ti.UI.FILL, but to no avail.
Output with the above code:
I am using Nexus 4. Please also note that if I edit the image and scale it, then it takes more width.