Amaresh
Amaresh

Reputation: 83

How to put a View under a tableView

I'm using tabBar. I've a window in which I've added a tableView and now I want to add a view at the bottom of the window (not at the end of table rows). It should appear at the bottom at all times. Any suggestions?

Upvotes: 0

Views: 353

Answers (1)

Mark
Mark

Reputation: 3859

Make some space under the tableview and then add a separate view to the window

So heres an example:

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);

Upvotes: 1

Related Questions