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:
- Single Navigation Graph which maintains all
BottomNavigation
items and which is shown here fromGoogle Codelabs
: https://codelabs.developers.google.com/codelabs/android-navigation/#1 - Multiple Navigation Graphs where every
BottomNavigation
item has its ownnavigation graph
which maintains only its behavior andbackstack
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.