Luke
11/20/2020, 6:43 PMNavHost
? I want to add a fragment that I don’t own, from a library, as a destination. I tried:
NavHost(
navController = navController,
startDestination = route,
) {
composable(...) { ... )
fragment<LibraryFragment>(id)
}
But when I run, the activity crashes with Could not find Navigator with name "fragment". You must call NavController.addNavigator() for each navigation type.
If it’s not possible, is there another way to add a fragment to composition?Ian Lake
11/20/2020, 7:20 PMAndroidView
or AndroidViewBindin
(if you want to inflate a FragmentContainerView
with an android:name
) ala: https://developer.android.com/jetpack/compose/interop#views-in-composeLuke
11/20/2020, 7:26 PMIan Lake
11/20/2020, 7:29 PMallan.conda
11/21/2020, 3:28 AM