[英]Full height listView in Titanium (Android/iOS)
我正在Titanium Studio中为iOS和Android开发一个多平台应用程序。 我需要像这样在Windows中传播listView:
图像,“某些文本”和带有按钮的页脚应具有静态高度(取决于其(子)元素的高度),屏幕的其余部分将为listView。
可能吗? 怎么样? 我尝试制作tableView,或者也尝试检测屏幕的高度,但是没有运气。
现在我正在练习:
body = Ti.UI.createView({
width:'100%',
height:'100%',
bottom: 0,
top: 0,
left: 0,
right: 0,
layout:'vertical',
borderColor: '#000000',
borderWidth: 2,
bottom: 0,
left: 0,
right: 0,
});
....
subbody = Ti.UI.createView({
height:200,
layout:'vertical',
borderColor: '#000000',
borderWidth: 2,
bottom: 0,
});
var createButton = new Ti.UI.createButton({
id:'createButton',
title: 'Vytvorit novy',
bottom: 0
});
var notfoundLabel = new Ti.UI.createLabel({
text: "Nebolo najdene",
height: '100',
width: '100%'
});
subbody.add(createButton);
subbody.add(notfoundLabel);
body.add(subbody);
但它看起来像(我在顶部还有另外一个元素(IMAGE)):
正如您所说的,某些文本和页脚的高度是静态的,您应该设置listview的顶部和底部。 这样,您可以在剩余区域中设置列表视图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.