I have an app with multiple feature modules that I want to navigate using a single NavHostFragment in my main module.
app
| | |
feature1 | feature2
| | |
common
The nav graph seems to work fine (I can add all the Fragments from the feature modules and the startFragment shows up when I start the app) but sometimes I have to start a navigation from inside the feature modules but I dont have access to the NavHostFragment there.
for example :
findNavController(navHostFragment).navigate(R.id.loginFragment)