1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    hamzazar is on a distinguished road

      0  

    Default 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

  2. #2
    Sencha User bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Answers
    49
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      0  

    Default


    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:

    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});
            }
        }
    }
    I hope this helps.

    Brice
    Brice 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.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3542
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Why not just use a Container with Card layout?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    hamzazar is on a distinguished road

      0  

    Default


    @bricemason ok I will try this solution

    Quote Originally Posted by mitchellsimoens View Post
    Why not just use a Container with Card layout?
    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

  5. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3542
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  6. #6
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    hamzazar is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2