Results 1 to 2 of 2

Thread: NavigationBar - how to disable or hide button as user navigates?

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Vote Rating

    Default NavigationBar - how to disable or hide button as user navigates?

    I have added a NavigationBar to my Sencha Touch 2 project, and it automatically adds a 'back' button when I push a view in response to a press of a button in that nav bar.

    The problem is, that same button is still visible and the user can click it again, which pushes the same view again. It's just not a good UI experience, and causes some other issues. SO, is there a way either automatically or manually to either hide, disable, or some other best practice to prevent the button from being used if the user is already looking at the view that button is going to push?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    You can listen to the activeitemchange event on the navigation view to then show/hide or enable/disable the button based on the new item.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts