Hi, similar to the navigation sample I'm using different navigation graphs and the extensions provided in the sample and I need to findController().navigate() between the second fragment of Navgraph A and third fragment of Navgraph B.
Since I'm also using Hilt dependency injection, the navigation graphs are injected with the VM initialisation inside fragments. I don't know how nicely this plays with advanced navigation ?
private val viewModel: ExampleViewModel by hiltNavGraphViewModels(R.id.navgraphId)
I noticed I can't just do a global action.... Simply include NavGraph B's fragment in navgraph A and then simply navigate() to it, you get all sorts of errors about the backstackentry or navgraph not being included. How would you navigate in this particular case ?
Hi, similar to the navigation sample I'm using different navigation graphs and the extensions provided in the sample and I need to
findController().navigate()
between the second fragment of Navgraph A and third fragment of Navgraph B.Since I'm also using Hilt dependency injection, the navigation graphs are injected with the VM initialisation inside fragments. I don't know how nicely this plays with advanced navigation ?
private val viewModel: ExampleViewModel by hiltNavGraphViewModels(R.id.navgraphId)
I noticed I can't just do a global action.... Simply include NavGraph B's fragment in navgraph A and then simply
navigate()
to it, you get all sorts of errors about the backstackentry or navgraph not being included. How would you navigate in this particular case ?