0

我正在使用标签栏。我有一个窗口,我在其中添加了一个 tableView,现在我想在窗口底部添加一个视图(而不是在表格行的末尾)。它应该始终出现在底部。有什么建议么?

4

1 回答 1

1

在 tableview 下腾出一些空间,然后在窗口中添加一个单独的视图

所以这里有一个例子:

var mainWindow = Ti.UI.createWindow({});

//This creates a tableview with a 100 pixel gap at the bottom of the window
var tableview = Titanium.UI.createTableView({top:0,left:0,right:0,bottom:100,backgroundColor:'green'});

//This adds the tableview to the mainWindow
mainWindow.add(tableview);

//This adds the view at the bottom of the screen that wont scroll and always stays fixed to the bottom
var bottomView = Titanium.UI.createView({bottom:0,left:0,right:0,height:100,backgroundColor:'red'});

//This adds the bottomView to the mainWindow
mainWindow.add(bottomView);
于 2013-06-22T14:15:59.500 回答