2013-01-19 119 views
0

我与vertical坞工具栏底部垂直布局

var tray = Ti.UI.createView({ 
    width:deviceWidth * 0.9, 
    height:'100%', 
    top:0, 
    left:0, 
    backgroundColor:'transparent', 
    layout:'vertical' 
}); 
win.add(tray); 

里面tray布局视图我有一个TableViewToolbar

var slideList = Ti.UI.createTableView({ 
    width:deviceWidth * 0.9, 
    height:xxx, //--> Need to know what to do here 
    top:0, 
    left:0, 
    search:searchList, 
    filterAttribute:'searchFilter', 
    backgroundColor:(Ti.Platform.osname == 'android') ? '#000000' : '#ffffff' 
}); 
tray.add(slideList); 

var iOSControls = Ti.UI.iOS.createToolbar({ 
    items:[flexSpace,backBtn,flexSpace,playBtn,flexSpace,linkBtn,flexSpace], 
    bottom:0, 
    borderTop:false, 
    borderBottom:true, 
    barColor:'#000' 
}); 
tray.add(iOSControls); 

我不完全知道如何大小TableView s height属性,以便它填充tray的高度减去iOSControls的高度。任何想法将appreciated..thanks

回答

0

我想在iOS设备有工具栏默认高度等于“44px”。

但是,你的情况,你试试这个代码,刚刚过去的这个代码复制在你的应用程序。

var tray = Ti.UI.createView({ 
    width:deviceWidth * 0.9, 
    height:'100%', 
    top:0, 
    left:0, 
    backgroundColor:'transparent', 
    layout:'horizontal' 
}); 
win.add(tray); 

var iOSControls = Ti.UI.iOS.createToolbar({ 
    items:[flexSpace,backBtn,flexSpace,playBtn,flexSpace,linkBtn,flexSpace], 
    bottom:0, 
    borderTop:false, 
    borderBottom:true, 
    barColor:'#000' 
}); 
tray.add(iOSControls); 
var slideList = Ti.UI.createTableView({ 
    width:deviceWidth * 0.9, 
    height:Ti.UI.FILL, //--> Need to know what to do here 
    top:0, 
    left:0, 
    search:searchList, 
    filterAttribute:'searchFilter', 
    backgroundColor:(Ti.Platform.osname == 'android') ? '#000000' : '#ffffff' 
}); 
tray.add(slideList); 
+0

啊这是44px。上面的代码没有任何区别。问题仍然在于幻灯片列表的高度。它填补了整个屏幕,并涵盖iOSControls – Ronnie

+0

你能告诉你截图...? – MRT

+0

我通过删除托盘中的布局属性来修复它 – Ronnie