I would like to ask a question in Titanium mobile. I am finding the way to add one custom navigation bar to all the screens in my project. Currently,I can’t find any way to do it. for each window now, I do like this:
win.barImage='images/navigation.png';
I don’t wish to do:
`win2.barImage='images/navigation.png';`
win3.barImage='images/navigation.png';
for all the screens. This is kinda trouble some, I want to find the way to add just once.
In Titanium to add navigation bar you add a navigation group.
After adding a navigation group you simply add window to it i.e those windows that should be having your navigation bar..
here is the code for that:
Now suppose you want to navigate to another window on a button click
then on the event listener of that button you can write this simple code.
nav.open(win2,{animated:true});win2 is the another window that you create
For more reference you can refer there API doc. here is the link.
Titanium API Doc