![]() ![]() No icon? Perfect! The button bar is a great tool for a text based navigation bar. You cannot programmatically alter this icon in the future, meaning if you wanted to change it you would have to copy/paste the button bar across all your layouts again. If your navigation bar is to use built in button icons, then once you define an icon for a segment that's it. To this point everything could be abstracted into a calculation, and thus alterable outside of the button bar object, but can we change the icon? The answer at this point is no. What about if we wish to highlight the current screen segment the user is on? Fortunately once again we can specify what the active segment is via calculation so all good there. Fortunately we can pass a script parameter that differs for each segment, so that takes care of that. The script needs to know which segment was pressed by the user in order to carry out the correct navigation. Next we need to be able to run a script to carry out the navigation. Fortunately labels can be defined for a segment based on calculation so that is perfect, we can have a different calculation result for each segment. So you've decided you want to use a button bar for your navigation - how do you now make it entirely generic and contextless? If we look at the button bar setup we can identify areas we'll need to abstract: The components of a button bar we need to setup If properly setup, it can be built to be entirely generic and contextless, and therefore able to be copy/pasted across multiple layouts. One of the biggest benefits of the button bar over other methods is that the button bar is simply a layout object without a fixed context. Each segment can run a script for navigation, and you have total control over how it looks - sounds like a perfect substitute!Īnd for most applications it is, but there are some small limitations as we'll get into later. The button bar on its surface seems to be very similar to our navigation method in regards to how it can be styled to look, and how it functions. It is robust, works well and highly flexible. Repeating fields are still utilised and have been abstracted to the point the navigation bar setup can be customised per-user and all of the formatting can be done via a combination of styles and editing the repeating field contents. ![]() ![]() It may surprise you to know that we here at Digital Fusion still use this method for our navigation bar with some small tweaks. In the second article - Taking it Further - we extended upon the first by introducing selected screen highlights and a navigation script. The first one - Starting out Simple - covers building a basic navigation bar using repeating fields. This is the third navigation article we have done and it has been quite some time between drinks. Previous Navigation Articles and our own Navigation ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |