Closed praveenshharma closed 3 years ago
@ianhanniballake Can you post an answer how to handle toolbar(placed in drawer with appbarconfiguration) from nested graph (contains by drawer fragment) ?
The architecture-component-samples
issues list is for issues with the samples only; this isn't the appropriate place for issues with a specific library (that would be for the official issue tracker) or about your own code (where stackoverflow would be a better choice).
All of my drawer fragments are controlled through MainFragment, inside MainFragment a DrawerLayout is implemented which contains DashboardMainFragment, SettingFragment and PrivacyFragment. My requirement is to show Toolbar with menu into every child of drawer. So MainFragment looks like:
MainFragment.kt
fragment_main.xml
content_main.xml
drawer_navigation.xml
fragment_dashboard_main.xml
dashboard_navigation.xml
Now stack management working fine like switching between Drawer Parent fragments(DashboardMain, Settings, Privacy). Now when I add nested graph in DashboardMainFragment which contains fragments like DashboardFragment, DashboardDetailFragment and navigate from DashboardFragment to DashboardDetailFragment, toolbar doesn't show back button automatically. It still displays hamburger icon.
My Question is, Is there any way in Jetpack Navigation so that toolbar can automatically take ownership of showing back button and also handles the nav controller for nested graphs and parent one.