Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28197] Android: Horizontal layout ignores right property

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2020-11-18T02:16:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterGary Mathews
AssigneeGary Mathews
Created2020-10-15T17:28:17.000+0000
Updated2020-11-18T02:16:48.000+0000

Description

- right property will be ignored on child-views of views using horizontal layout *TEST CASE*
const win = Ti.UI.createWindow({
	backgroundColor: 'gray'
});
const row = Ti.UI.createView({
	layout: 'horizontal',
	backgroundColor: 'white',
	width: Ti.UI.FILL,
	height: 50
});
const view_a = Ti.UI.createView({
	backgroundColor: 'green',
	left: 50,
	// right: 50,
	width: 50,
	height: 50
});
const view_b = Ti.UI.createView({
	backgroundColor: 'red',
	// left: 50,
	right: 50,
	width: 50,
	height: 50
});

row.add([ view_a, view_b ]);
win.add(row);
win.open();
*EXPECTED* - Layout takes into account right property of child-view and aligns view to the right. *ACTUAL* - right property is ignored, view is left aligned.

Attachments

FileDateSize
HorizontalPinAlignTest.js2020-10-21T02:49:36.000+00001358
VerticalPinAlignTest.js2020-10-21T02:49:48.000+0000720

Comments

  1. Gary Mathews 2020-10-15

    master: https://github.com/appcelerator/titanium_mobile/pull/12182
  2. Gary Mathews 2020-10-21

    Default right property behaviour in horizontal view is as intended. Closing.

JSON Source