NavigationGroup back to beginning
Hi everyone.
i want to make a custom "back to the beginning" Button with the NavigationGroup.
I know the code to go back 1 window is
nav.close(win_next,{animated:true});
how should i do the back to home? Is this even possible?
Thanks.
3 Answers
-
I am working on the same feature. It works fine for me. I just make sure that the script that does all the closing has access to the all the windows.
In my case, each window is associated with its own file. So, I have three files: page1.js, page2.js, page3.js. I want page3.js to be able to close all the windows.
In my app.js, I include all the windows:
Ti.include('page1.js', 'page2.js', 'page3.js');
Here's my code segment for page3.js:
if (page3.doneWithPages) { nav.group.close(page3.win); nav.group.close(page2.win); nav.group.close(page1.win); }
This worked for me with Titanium 1.4 using Navigation Groups.
-
I solved it by tracking the parent windows
http://blog.clearlyinnovative.com/post/1624173028/titanium-appcelerator-quickie-navigation-groups -
Hi and Thank you.
But i solved it differently now.
i have the start-window where the navigation to the subwindows is.
on click on one of this buttons it opens a modal-window and in this window i just write new content into the image and webview on button-click for the next page.
on click to go back i just close this window and i am back at the first window.i don't know why i have so many problems with opening windows that are opened from another window. the only problem i have now is that i already need the next window that is opened with a horizontal flip exactly the same in all windows that are opened before. It works in the start-window. but it does not work correctly in the second window.
I now open that third window in the navigationgroup when i am in the second window. But now the window is just sliding in from the right and i can not use the flip animation.
i think i didn't have understand the window handling in titanium