How to use Android Navigation Component + BottomNavigationView+ NavigationView (Navigation Drawer)

可紊 提交于 2020-04-10 03:30:27

问题


I would like to know what is the best practice of using Navigation Component + BottomNavigationView + NavigationDrawer.

I have tried google's advanced sample for Navigation component. It worked very well for multiple back stack modules. Because it has a workaround extension. When using this approach, each bottom tab has its own graph and the graphs change as you select one of the tabs.

But when NavigationView is integrated, it needs to know the navigation graph in advance. But in advanced sample the navGraph attribute is not used, graphs added programmatically for bottomNavigation.

So how do we manage graphs when both Bottom Navigation View and Navigation Drawer View are used together?

来源:https://stackoverflow.com/questions/58345696/how-to-use-android-navigation-component-bottomnavigationview-navigationview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!