Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5670] MobileWeb: Layout of the view does not changes after change of the property layout

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-06-13T03:36:47.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelsn/a
ReporterMisha Vasko
AssigneeMaxim Negadaylov
Created2011-06-13T02:42:58.000+0000
Updated2017-03-09T20:40:51.000+0000

Description

After changing layout property from horizontal to vertical the layout of the view is still horizontal. To change layout the view have to be redraw.
var win = Ti.UI.currentWindow;

var view = Ti.UI.createView({
	height:300,
	width:320,
	layout:'horizontal'
});
win.add(view);

var l1 = Ti.UI.createLabel({
	text:'Click to change layout',
	left:5,
	width:'auto',
	height:20,
	fontSize: 20 
});

view.add(l1);

var l2 = Ti.UI.createLabel({
	text:'I am the second label',
	left:2,
	width:'auto',
	height:20
});

view.add(l2);

var l3 = Ti.UI.createLabel({
	text:'I am the third label',
	left:2,
	width:'auto',
	height:20
});

view.add(l3);

l1.addEventListener('click', function(){
	view.layout = 'vertical';
	l1.text = 'Layout changed';
});

Comments

  1. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source