View width to take 100% of the layout
Hi,
Just a simple question, is there a way to set a view such as textField width so that it takes 100% of the layout?
Thanks,
2 Answers
-
Well,
I found the solution, but I don't know if it is the clean way to do that. Just set the left and right property of your view so that the view is automatically fill the layout.
var win = Titanium.UI.currentWindow; var query = Titanium.UI.createTextField({ height:48, top: 10, left: 10, right: 10, value:'text', borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED }); win.add(query);
-
width:'100%'
does not work?