Now I am wondering which is the most proper way of implementation when want to combine BottomNavigation
with the new Android Architecture Navigation Component
?
For now found two approaches:
BottomNavigation
items and which is shown here from Google Codelabs
: https://codelabs.developers.google.com/codelabs/android-navigation/#1 BottomNavigation
item has its own navigation graph
which maintains only its behavior and backstack
which i shown here: https://proandroiddev.com/mastering-the-bottom-navigation-with-the-new-navigation-architecture-component-cd6a71b266ae
My opinion is that the second one is more clear and understandable, but maybe you have another opinion.
Having separate backstacks or not is a decision based on user experience but if you do want multiple backstacks for bottomnavigation then follow the link for correct approach by androidx developers. https://github.com/googlesamples/android-architecture-components/tree/master/NavigationAdvancedSample
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With