[TIMOB-8062] iOS: Can't position horizontal layout
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-03-16T14:57:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Rick Blalock |
Assignee | Neeraj Gupta |
Created | 2012-03-16T13:31:17.000+0000 |
Updated | 2017-03-09T23:20:32.000+0000 |
Description
Images with horizontal layout and aligned to the right do not align to the right. Test case below. Sample image: https://img.skitch.com/20120316-1tsrj7gygeb9366wjmwgmru53i.jpg (the three placeholders on the left should be on the right).
Sample code:
Ti.UI.setBackgroundColor('#fff');
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
/**
* Reuters test case 1 - Images with horizontal layout and aligned to the right
*/
var test1Wrapper = Ti.UI.createView({
width: '100%',
height: 45,
top: 0,
backgroundColor: '#eee'
});
var test1ImageBar = Ti.UI.createView({
layout: 'horizontal',
width: Ti.UI.Size,
height: 45,
right: 45
});
var test1Image1 = Ti.UI.createImageView({
width: 45,
height: 45,
image: 'http://placehold.it/45x45'
});
var test1Image2 = Ti.UI.createImageView({
width: 45,
height: 45,
image: 'http://placehold.it/45x45'
});
var test1Image3 = Ti.UI.createImageView({
width: 45,
height: 45,
image: 'http://placehold.it/45x45'
});
test1ImageBar.add(test1Image1);
test1ImageBar.add(test1Image2);
test1ImageBar.add(test1Image3);
test1Wrapper.add(test1ImageBar);
win.add(test1Wrapper);
win.open();
Typo Ti.UI.Size != Ti.UI.SIZE
My bad. Typo on this. The constant is Ti.UI.SIZE.
Closing ticket as invalid.