views:

57

answers:

3

In Titanium how do I 'dock' a footer menu to the bottom of the screen on Android and iPhone? I want to display 3 icons on the bottom of the screen.

+1  A: 

Use Titanium.UI.ToolBar for that.

ceejayoz
This works for iPhone but not for Android :(
David Silva Smith
+1  A: 

I used Titanium.UI.View and set bottom: 0 to get it to dock to the bottom.

David Silva Smith
A: 

Yes, we use Ti.UI.Toolbar for this. Let see this example code:

var space = Titanium.UI.createButton({
    systemButton: Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});

var buttonNextEnd = Titanium.UI.createButton({
    title: '>>'
});
var buttonNext1Page = Titanium.UI.createButton({
    title: '>'
});
var buttonPrevEnd = Titanium.UI.createButton({
    title: '<<'
});
var buttonPrev1Page = Titanium.UI.createButton({
    title: '<'
});

var toolbarNav = Titanium.UI.createToolbar({
    left : 0,
    bottom: 0,
    height : 40,
    width : 320,
    items: [buttonPrevEnd,space, buttonPrev1Page,space, buttonNext1Page, space,buttonNextEnd]
});

win.add(toolbarNav);
anticafe
I didn't get toolbar to work in Android. The documentation indicates it is an iPhone only feature.
David Silva Smith