androidx.navigation.fragment.compose


Navigation with Fragments support destinations written as Fragments. This artifacts builds upon that base to allow you to add destinations written purely in Compose to your navigation graph without rewriting your entire navigation structure.

It does this by wrapping each destination written in Compose in its own Fragment instance, using reflection to call your @Composable function.

Classes

ComposableFragment

This class provides a Fragment wrapper around a composable function that is loaded via reflection.

ComposableFragmentNavigator

This Navigator intercepts the inflation of navigation destinations in a Navigation with Fragment XML file, reusing the android:name field as the fully qualified name of the composable function to use as the contents of the inflated destination.

ComposableNavHostFragment

A NavHostFragment that adds support for ComposableFragment instances via ComposableFragmentNavigator.

Top-level properties summary

ProvidableCompositionLocal<Fragment>

The CompositionLocal containing the containing Fragment.

Top-level properties

val LocalFragmentProvidableCompositionLocal<Fragment>

The CompositionLocal containing the containing Fragment. This is sett by default for composables created within a ComposableFragment.