4 Oct 2014 9:13 AM #1
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?
6 Oct 2014 4:29 AM #2
- 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.
Sencha Inc, Senior Software Engineer
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. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.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.