Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10735] iOS: ImageView with height or width of Ti.UI.SIZE sizes improperly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2015-01-27T21:27:53.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sBacklog
ComponentsiOS
Labelscore, exalture
ReporterMartin Guillon
AssigneeIngo Muschenetz
Created2012-08-22T23:43:46.000+0000
Updated2017-03-22T22:13:23.000+0000

Description

If you use width or height = Ti.UI.SIZE in an imageview, then the image is sized correctly but not its containing view. The example shows that it s also happening with xhr
var win = Ti.UI.createWindow({
    backgroundColor: 'white'
});


var fileName = "http://3.bp.blogspot.com/_Z-tqVTd9fPI/TRzjXBKIKvI/AAAAAAAACEo/wflE9APHFWE/s200/steve_jobs.jpg";
var xhr = Titanium.Network.createHTTPClient();
 
image = Ti.UI.createImageView({
    width:Ti.UI.SIZE,
    backgroundColor:'blue',
    image:fileName,
    height:80
});

win.add(image);

xhr.onload = function() {
    image.image = this.responseData;
};
xhr.open('GET', fileName);

win.open();

// xhr.send();

Comments

  1. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source