var Section1 = Titanium.UI.createView({
top:0,
height: 'auto',
});
var Section2 = Titanium.UI.createView({
top:0,
height: 'auto',
});
I have two views and these two views has some buttons and TextFields which es dyanmically. How can i control the Section 2 that it does not over lap the Section 1 View when its height gets increased.
var Section1 = Titanium.UI.createView({
top:0,
height: 'auto',
});
var Section2 = Titanium.UI.createView({
top:0,
height: 'auto',
});
I have two views and these two views has some buttons and TextFields which es dyanmically. How can i control the Section 2 that it does not over lap the Section 1 View when its height gets increased.
Share Improve this question asked Apr 14, 2011 at 15:06 theJavatheJava 15k48 gold badges134 silver badges174 bronze badges3 Answers
Reset to default 4I don't know if there's a better way, but I had a similar issue recently, which I tentatively solved like so
var Section1 = Titanium.UI.createView({
top:0,
height: 'auto',
});
// Add other views to Section1
var Section2 = Titanium.UI.createView({
top: Section1.toImage().height,
height: 'auto',
});
I think in your case the height will only be accurate after you've added your other views and objects to it.
If you are adding your views directly to the Ti.UI.currentWindow then you can just set layout of the Ti.UI.currentWindow to 'vertical' and the heights will automatically adjust
Ti.UI.currentWindow.layout = 'vertical';
Ti.UI.createView({
layout : 'vertical',
height : Ti.UI.SIZE
});
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744772824a4592863.html
评论列表(0条)