A SupportingPaneSceneStrategy supports arranging NavEntrys into an adaptive SupportingPaneScaffold. By using mainPane, supportingPane, or extraPane in a NavEntry's metadata, entries can be assigned as belonging to a main pane, supporting pane, or extra pane. These panes will be displayed together if the window size is sufficiently large, and will automatically adapt if the window size changes, for example, on a foldable device.

Summary

Public companion functions

Map<StringAny>
extraPane(sceneKey: Any)

Constructs metadata to mark a NavEntry as belonging to an extra pane within a SupportingPaneScaffold.

Cmn
Map<StringAny>
mainPane(sceneKey: Any)

Constructs metadata to mark a NavEntry as belonging to a main pane within a SupportingPaneScaffold.

Cmn
Map<StringAny>
supportingPane(sceneKey: Any)

Constructs metadata to mark a NavEntry as belonging to a supporting pane within a SupportingPaneScaffold.

Cmn

Public constructors

<T : Any> SupportingPaneSceneStrategy(
    backNavigationBehavior: BackNavigationBehavior,
    directive: PaneScaffoldDirective
)
Cmn

Public functions

open Scene<T>?

Given a SceneStrategyScope, calculate whether this SceneStrategy should take on the task of rendering one or more of the entries in the scope.

Cmn

Public properties

BackNavigationBehavior

the behavior describing which backstack entries may be skipped during the back navigation.

Cmn
PaneScaffoldDirective

The top-level directives about how the scaffold should arrange its panes.

Cmn

Inherited functions

From androidx.navigation3.scene.SceneStrategy
open infix SceneStrategy<T>
then(sceneStrategy: SceneStrategy<T>)

Chains this SceneStrategy with another sceneStrategy to return a combined SceneStrategy.

Cmn

Public companion functions

extraPane

fun extraPane(sceneKey: Any = Unit): Map<StringAny>

Constructs metadata to mark a NavEntry as belonging to an extra pane within a SupportingPaneScaffold.

Parameters
sceneKey: Any = Unit

the key to distinguish the scene of the supporting-pane scaffold, in case multiple supporting-pane scaffolds are used within the same NavDisplay.

mainPane

fun mainPane(sceneKey: Any = Unit): Map<StringAny>

Constructs metadata to mark a NavEntry as belonging to a main pane within a SupportingPaneScaffold.

Parameters
sceneKey: Any = Unit

the key to distinguish the scene of the supporting-pane scaffold, in case multiple supporting-pane scaffolds are used within the same NavDisplay.

supportingPane

fun supportingPane(sceneKey: Any = Unit): Map<StringAny>

Constructs metadata to mark a NavEntry as belonging to a supporting pane within a SupportingPaneScaffold.

Parameters
sceneKey: Any = Unit

the key to distinguish the scene of the supporting-pane scaffold, in case multiple supporting-pane scaffolds are used within the same NavDisplay.

Public constructors

SupportingPaneSceneStrategy

<T : Any> SupportingPaneSceneStrategy(
    backNavigationBehavior: BackNavigationBehavior,
    directive: PaneScaffoldDirective
)
Parameters
backNavigationBehavior: BackNavigationBehavior

the behavior describing which backstack entries may be skipped during the back navigation. See BackNavigationBehavior.

directive: PaneScaffoldDirective

The top-level directives about how the scaffold should arrange its panes.

Public functions

open fun SceneStrategyScope<T>.calculateScene(entries: List<NavEntry<T>>): Scene<T>?

Given a SceneStrategyScope, calculate whether this SceneStrategy should take on the task of rendering one or more of the entries in the scope.

By returning a non-null Scene, your Scene takes on the responsibility of rendering the set of entries you declare in Scene.entries. If you return null, the next available SceneStrategy will be called.

Parameters
entries: List<NavEntry<T>>

The entries on the back stack that should be considered valid to render via a returned Scene.

Public properties

backNavigationBehavior

val backNavigationBehaviorBackNavigationBehavior

the behavior describing which backstack entries may be skipped during the back navigation. See BackNavigationBehavior.

directive

val directivePaneScaffoldDirective

The top-level directives about how the scaffold should arrange its panes.