Hi. I want to build a kind of master detail view w...
# navigation-architecture-component
b
Hi. I want to build a kind of master detail view when the screen is big enough. does anyone have experience using navigation component (single activity) with this layout. 1. how do i get the navController in both fragments 2. how is the xml layout lookin g (e.g. navController) 3. which structure would be best if we need some screens with/without toolbar and/or tablayout with viewpager • activity (with toolbar and or tablayout -> hide/show) -> masterFragment | detailFragment • activity -> containerfragment (with toolbar and or tablayout) -> masterFragment | detailFragment thanks for the help / discussion
f
These are very basic things NavComponent can achieve successfully. See the examples at https://github.com/android/architecture-components-samples
b
Thanks @Fatih. But I am looking for master/details examples with the navigation component
f
It is pretty much same for all examples. You can access `navController`in any fragments by calling
findNAvController
extension function. So that means, you can navigate to any activity, fragment or even fragment dialog inside a fragment/activity using NavComponent