Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8062] iOS: Can't position horizontal layout

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2012-03-16T14:57:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterRick Blalock
AssigneeNeeraj Gupta
Created2012-03-16T13:31:17.000+0000
Updated2017-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();

Comments

  1. Vishal Duggal 2012-03-16

    Typo Ti.UI.Size != Ti.UI.SIZE
  2. Rick Blalock 2012-03-16

    My bad. Typo on this. The constant is Ti.UI.SIZE.
  3. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source