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?
Asked
Active
Viewed 333 times
0
-
Adding it through xib.. – Jitendra Jun 22 '13 at 07:25
-
But I'm using titanium studio and there is no interface builder. – Amaresh Jun 22 '13 at 07:38
-
So dont worry trying to add uiview programatically. – Jitendra Jun 22 '13 at 07:46
-
Assigning the tableview height to a desired value does the job. – Amaresh Nov 03 '13 at 12:25
1 Answers
1
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);

Mark
- 3,653
- 10
- 30
- 62