androidx.navigation3.scene


Interfaces

OverlayScene

A specific scene to render 1 or more NavEntry instances as an overlay.

Cmn
Scene

A specific scene to render 1 or more androidx.navigation3.runtime.NavEntrys.

Cmn
SceneStrategy

A strategy that tries to calculate a Scene given a list of NavEntry.

Cmn

Classes

DialogSceneStrategy

A SceneStrategy that displays entries that have added dialog to their NavEntry.metadata within a Dialog instance.

Cmn
SceneInfo

Represents a snapshot of the visible destinations in a navigation container.

Cmn
SceneState

Class for holding the state associated with a scene

Cmn
SinglePaneSceneStrategy

A SceneStrategy that always creates a 1-entry Scene simply displaying the last entry in the list.

Cmn

Top-level functions summary

NavEntryDecorator<T>

A NavEntryDecorator that wraps each entry in a movableContentOf to allow nav displays to arbitrarily place entries in different places in the composable call hierarchy and ensures that the same entry content is not composed multiple times in different places of the hierarchy by different scenes.

Cmn
NavEntryDecorator<T>

Returns a SceneSetupNavEntryDecorator that is remembered across recompositions.

Cmn
SceneState<T>
@Composable
<T : Any> rememberSceneState(
    entries: List<NavEntry<T>>,
    sceneStrategy: SceneStrategy<T>,
    onBack: (Int) -> Unit
)

Returns a SceneState that is remembered across compositions based on the parameters.

Cmn

Top-level properties summary

ProvidableCompositionLocal<Set<Any>>

The entry keys to render in the current Scene, in the sense of the target of the animation for an androidx.compose.animation.AnimatedContent that is transitioning between different scenes.

Cmn

Top-level functions

SceneSetupNavEntryDecorator

fun <T : Any> SceneSetupNavEntryDecorator(): NavEntryDecorator<T>

A NavEntryDecorator that wraps each entry in a movableContentOf to allow nav displays to arbitrarily place entries in different places in the composable call hierarchy and ensures that the same entry content is not composed multiple times in different places of the hierarchy by different scenes.

This should likely be the first NavEntryDecorator to ensure that other NavEntryDecorator calls that are stateful are moved properly inside the movableContentOf.

rememberSceneSetupNavEntryDecorator

@Composable
fun <T : Any> rememberSceneSetupNavEntryDecorator(): NavEntryDecorator<T>

Returns a SceneSetupNavEntryDecorator that is remembered across recompositions.

rememberSceneState

@Composable
fun <T : Any> rememberSceneState(
    entries: List<NavEntry<T>>,
    sceneStrategy: SceneStrategy<T>,
    onBack: (Int) -> Unit
): SceneState<T>

Returns a SceneState that is remembered across compositions based on the parameters.

This calculates all of the scenes and provides them in a SceneState.

Parameters
entries: List<NavEntry<T>>

all of the entries that are associated with this state

sceneStrategy: SceneStrategy<T>

the SceneStrategy to determine which scene to render a list of entries.

onBack: (Int) -> Unit

a callback for handling system back press. The passed Int refers to the number of entries to pop from the end of the backstack, as calculated by the sceneStrategy.

Top-level properties

LocalEntriesToRenderInCurrentScene

val LocalEntriesToRenderInCurrentSceneProvidableCompositionLocal<Set<Any>>

The entry keys to render in the current Scene, in the sense of the target of the animation for an androidx.compose.animation.AnimatedContent that is transitioning between different scenes.