public final class SceneState<T extends Object>


Class for holding the state associated with a scene

This provides information to the androidx.navigation3.ui.NavDisplay and androidx.navigationevent.compose.NavigationBackHandler to ensure they can behave correctly.

Summary

Public methods

final @NonNull Scene<@NonNull T>

the current scene that could be displayed

final @NonNull List<@NonNull NavEntry<@NonNull T>>

all of the entries that are associated with this state

final @NonNull List<@NonNull OverlayScene<@NonNull T>>

any overlay scenes available to the state

final @NonNull List<@NonNull Scene<@NonNull T>>

the list of all of the previous scenes before the currentScene

Public methods

getCurrentScene

Added in 1.0.0-alpha10
public final @NonNull Scene<@NonNull T> getCurrentScene()

the current scene that could be displayed

getEntries

Added in 1.0.0-alpha10
public final @NonNull List<@NonNull NavEntry<@NonNull T>> getEntries()

all of the entries that are associated with this state

getOverlayScenes

Added in 1.0.0-alpha10
public final @NonNull List<@NonNull OverlayScene<@NonNull T>> getOverlayScenes()

any overlay scenes available to the state

getPreviousScenes

Added in 1.0.0-alpha10
public final @NonNull List<@NonNull Scene<@NonNull T>> getPreviousScenes()

the list of all of the previous scenes before the currentScene