posted by Murat Yener
It’s a wrap !! We’ve just completed the second round of MAD Skills Navigation. In this series, we have revisited Chet’s DonutTracker app and added an important missing feature: the ability to track coffee.
With new features come new responsibilities. While we’ve added coffee tracking, we’ve also improved the browsing experience, implemented conditional browsing, modularized the app, and ultimately learned what’s changing with multiple backstack support.
Episode 1: NavigationUI
As new destinations were added to the app, we used NavigationUI to provide a better browsing user interface experience. NavigationUI helped us to automatically integrate NavigationView and BasNavigationView with the existing menu IDs for the destinations. You can check out the video linked below or if you prefer to read the article here.
Episode 2: Conditional Navigation
We added a coffee tracking feature in the first episode, but whether users turn coffee tracking off or on, they can still access the CoffeeList fragment. In this episode, we fixed this issue by adding conditional navigation and asking our users to make a selection when they launch the app for the first time.
You can find the same content in the form of an article here.
Episode 3: Nested Graphics and Inclusion
In the third episode, we took a step back and organized the navigation graph using nested graphics and using the include tag to import other graphics. While keeping our project more organized, it also allowed us to modularize the app and see how navigation works with modules. Check item or the video below.
Episode 4: Feature Modules
In the fourth episode, we took the application a step further and converted the coffee module into a functional module. With this change, the coffee tracking feature will only be downloaded and installed for users who have enabled this feature. The dynamic features allowed us to modularize the application to save network and storage for the user. To learn more, watch the video linked below or if you prefer to read the article here.
Episode 5: Multiple Rear Piers
In this episode, we covered a much requested feature, support for multiple backstacks for navigation. To support multiple back stacks, you just need to update your navigation and fragment dependencies. You can observe multiple backstack behaviors with NavigationView and BottomNavigationView instantly without any code changes!
You can also find the same content in the form of an article here.
Episode 6: Live Q&A
Finally, we ended the second round of Navigation with a live question-and-answer session where we answered your questions. If you missed the Q&A, be sure to check out the recording below.
Examples of applications
Donut and coffee tracker
The app used for the first 4 episodes of the series is the DonutTracker app that Chet created during the first MAD Skills Navigation series. You can follow the progress of each episode by viewing the Entrance and solution code of this repository.
Example of advanced navigation
This project is used to demonstrate support for multiple backstacking in navigation. Prior to Navigation version 2.4.0-alpha01, this project offered navigation extensions to mimic the behavior of the multiple backstack. You can view the solution code with updated dependencies and removed NavigationExtensions in this deposit.
This ends the second Navigation series but the MAD series will continue with another exciting topic! Be sure to stay tuned for more Android craziness!