[TIMOB-5670] MobileWeb: Layout of the view does not changes after change of the property layout
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-06-13T03:36:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | n/a |
Reporter | Misha Vasko |
Assignee | Maxim Negadaylov |
Created | 2011-06-13T02:42:58.000+0000 |
Updated | 2017-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';
});
Closing ticket as fixed.