-
16 Nov 2012 2:18 AM #1
Unanswered: Navigation view only in child view
Unanswered: Navigation view only in child view
Hi there,
How I can display the navigation tab only in child items of the navigation view and hide it only in the first view.
Thanks
-
18 Nov 2012 9:10 PM #2
This could be achieved by setting the navigationBar config option on your navigation view to false.
Then apply the following activeitemchange listener to your navigation view:
I hope this helps.Code:listeners: { activeitemchange: function(navView, newvalue, oldvalue, opt) { // get the index position of the new active item var i = navView.getInnerItems().indexOf(newvalue); // hide the navigation bar for the first view if(i == 0) { navView.setNavigationBar(false); } else { navView.setNavigationBar({docked:'top', hidden: false}); } } }
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
19 Nov 2012 6:26 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3102
Why not just use a Container with Card layout?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Nov 2012 8:11 AM #4
@bricemason ok I will try this solution
But if in sencha they have a navigation view why I reinventing the wheel? I thing sencha can do this simple modification in the navigation view
-
19 Nov 2012 8:36 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3102
You're not using the navigation view as it was designed. So for what you want, the only thing that is special is the push/pop methods which is very easily done with less code using a Container and card layout.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Nov 2012 10:57 AM #6
will your solution approve the performence? because I have a performance problem with iphone, the app it very slow specially in animation. If I use container with card layout I need to add the back button and other code my self that is not the case with navigation view. I think that will complicate the code so my app will be more slowly.


Reply With Quote