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.
This works for iPhone but not for Android :(
David Silva Smith
2010-10-20 17:23:40
+1
A:
I used Titanium.UI.View and set bottom: 0 to get it to dock to the bottom.
David Silva Smith
2010-10-20 17:31:24
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
2010-10-22 13:37:52
I didn't get toolbar to work in Android. The documentation indicates it is an iPhone only feature.
David Silva Smith
2010-10-22 14:09:07