androidx.compose.material3.adaptive.navigation


Interfaces

ThreePaneScaffoldNavigator

The common interface of the default navigation implementations for different three-pane scaffolds.

Cmn

Enums

BackNavigationBehavior

A class to control how back navigation should behave in a ThreePaneScaffoldNavigator.

Cmn

Top-level functions summary

Unit
@ExperimentalMaterial3AdaptiveApi
@Composable
NavigableListDetailPaneScaffold(
    navigator: ThreePaneScaffoldNavigator<Any>,
    listPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    detailPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    modifier: Modifier,
    extraPane: (@Composable ThreePaneScaffoldScope.() -> Unit)?,
    defaultBackBehavior: BackNavigationBehavior
)

A version of androidx.compose.material3.adaptive.layout.ListDetailPaneScaffold that supports navigation and back handling out of the box, controlled by ThreePaneScaffoldNavigator.

android
Unit
@ExperimentalMaterial3AdaptiveApi
@Composable
NavigableSupportingPaneScaffold(
    navigator: ThreePaneScaffoldNavigator<Any>,
    mainPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    supportingPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    modifier: Modifier,
    extraPane: (@Composable ThreePaneScaffoldScope.() -> Unit)?,
    defaultBackBehavior: BackNavigationBehavior
)

A version of androidx.compose.material3.adaptive.layout.SupportingPaneScaffold that supports navigation and back handling out of the box, controlled by ThreePaneScaffoldNavigator.

android
ThreePaneScaffoldNavigator<Nothing>
@ExperimentalMaterial3AdaptiveApi
@Composable
rememberListDetailPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective,
    adaptStrategies: ThreePaneScaffoldAdaptStrategies,
    isDestinationHistoryAware: Boolean
)

Returns a remembered default implementation of ThreePaneScaffoldNavigator for ListDetailPaneScaffold, which will be updated automatically when the input values change.

Cmn
ThreePaneScaffoldNavigator<T>
@ExperimentalMaterial3AdaptiveApi
@Composable
<T : Any?> rememberListDetailPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective,
    adaptStrategies: ThreePaneScaffoldAdaptStrategies,
    isDestinationHistoryAware: Boolean,
    initialDestinationHistory: List<ThreePaneScaffoldDestinationItem<T>>
)

Returns a remembered default implementation of ThreePaneScaffoldNavigator for ListDetailPaneScaffold, which will be updated automatically when the input values change.

Cmn
ThreePaneScaffoldNavigator<Nothing>
@ExperimentalMaterial3AdaptiveApi
@Composable
rememberSupportingPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective,
    adaptStrategies: ThreePaneScaffoldAdaptStrategies,
    isDestinationHistoryAware: Boolean
)

Returns a remembered default implementation of ThreePaneScaffoldNavigator for SupportingPaneScaffold, which will be updated automatically when the input values change.

Cmn
ThreePaneScaffoldNavigator<T>
@ExperimentalMaterial3AdaptiveApi
@Composable
<T : Any?> rememberSupportingPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective,
    adaptStrategies: ThreePaneScaffoldAdaptStrategies,
    isDestinationHistoryAware: Boolean,
    initialDestinationHistory: List<ThreePaneScaffoldDestinationItem<T>>
)

Returns a remembered default implementation of ThreePaneScaffoldNavigator for SupportingPaneScaffold, which will be updated automatically when the input values change.

Cmn

Top-level functions

@ExperimentalMaterial3AdaptiveApi
@Composable
fun NavigableListDetailPaneScaffold(
    navigator: ThreePaneScaffoldNavigator<Any>,
    listPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    detailPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    modifier: Modifier = Modifier,
    extraPane: (@Composable ThreePaneScaffoldScope.() -> Unit)? = null,
    defaultBackBehavior: BackNavigationBehavior = BackNavigationBehavior.PopUntilContentChange
): Unit

A version of androidx.compose.material3.adaptive.layout.ListDetailPaneScaffold that supports navigation and back handling out of the box, controlled by ThreePaneScaffoldNavigator.

Parameters
navigator: ThreePaneScaffoldNavigator<Any>

The navigator instance to navigate through the scaffold.

listPane: @Composable ThreePaneScaffoldScope.() -> Unit

the list pane of the scaffold, which is supposed to hold a list of item summaries that can be selected from, for example, the inbox mail list of a mail app. See ListDetailPaneScaffoldRole.List.

detailPane: @Composable ThreePaneScaffoldScope.() -> Unit

the detail pane of the scaffold, which is supposed to hold the detailed info of a selected item, for example, the mail content currently being viewed. See ListDetailPaneScaffoldRole.Detail.

modifier: Modifier = Modifier

Modifier of the scaffold layout.

extraPane: (@Composable ThreePaneScaffoldScope.() -> Unit)? = null

the extra pane of the scaffold, which is supposed to hold any supplementary info besides the list and the detail panes, for example, a task list or a mini-calendar view of a mail app. See ListDetailPaneScaffoldRole.Extra.

defaultBackBehavior: BackNavigationBehavior = BackNavigationBehavior.PopUntilContentChange

the default back navigation behavior when the system back event happens. See BackNavigationBehavior for the use cases of each behavior.

@ExperimentalMaterial3AdaptiveApi
@Composable
fun NavigableSupportingPaneScaffold(
    navigator: ThreePaneScaffoldNavigator<Any>,
    mainPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    supportingPane: @Composable ThreePaneScaffoldScope.() -> Unit,
    modifier: Modifier = Modifier,
    extraPane: (@Composable ThreePaneScaffoldScope.() -> Unit)? = null,
    defaultBackBehavior: BackNavigationBehavior = BackNavigationBehavior.PopUntilContentChange
): Unit

A version of androidx.compose.material3.adaptive.layout.SupportingPaneScaffold that supports navigation and back handling out of the box, controlled by ThreePaneScaffoldNavigator.

Parameters
navigator: ThreePaneScaffoldNavigator<Any>

The navigator instance to navigate through the scaffold.

mainPane: @Composable ThreePaneScaffoldScope.() -> Unit

the main pane of the scaffold, which is supposed to hold the major content of an app, for example, the editing screen of a doc app. See SupportingPaneScaffoldRole.Main.

supportingPane: @Composable ThreePaneScaffoldScope.() -> Unit

the supporting pane of the scaffold, which is supposed to hold the support content of an app, for example, the comment list of a doc app. See SupportingPaneScaffoldRole.Supporting.

modifier: Modifier = Modifier

Modifier of the scaffold layout.

extraPane: (@Composable ThreePaneScaffoldScope.() -> Unit)? = null

the extra pane of the scaffold, which is supposed to hold any additional content besides the main and the supporting panes, for example, a styling panel in a doc app. See SupportingPaneScaffoldRole.Extra.

defaultBackBehavior: BackNavigationBehavior = BackNavigationBehavior.PopUntilContentChange

the default back navigation behavior when the system back event happens. See BackNavigationBehavior for the use cases of each behavior.

rememberListDetailPaneScaffoldNavigator

@ExperimentalMaterial3AdaptiveApi
@Composable
fun rememberListDetailPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo()),
    adaptStrategies: ThreePaneScaffoldAdaptStrategies = ListDetailPaneScaffoldDefaults.adaptStrategies(),
    isDestinationHistoryAware: Boolean = true
): ThreePaneScaffoldNavigator<Nothing>

Returns a remembered default implementation of ThreePaneScaffoldNavigator for ListDetailPaneScaffold, which will be updated automatically when the input values change. The default navigator is supposed to be used independently from any navigation frameworks and handles the navigation purely inside the ListDetailPaneScaffold.

Parameters
scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo())

the current layout directives to follow. The default value will be calculated with calculatePaneScaffoldDirective using WindowAdaptiveInfo retrieved from the current context.

adaptStrategies: ThreePaneScaffoldAdaptStrategies = ListDetailPaneScaffoldDefaults.adaptStrategies()

adaptation strategies of each pane.

isDestinationHistoryAware: Boolean = true

true if the scaffold value calculation should be aware of the full destination history, instead of just the current destination. See calculateThreePaneScaffoldValue for more relevant details.

rememberListDetailPaneScaffoldNavigator

@ExperimentalMaterial3AdaptiveApi
@Composable
fun <T : Any?> rememberListDetailPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo()),
    adaptStrategies: ThreePaneScaffoldAdaptStrategies = ListDetailPaneScaffoldDefaults.adaptStrategies(),
    isDestinationHistoryAware: Boolean = true,
    initialDestinationHistory: List<ThreePaneScaffoldDestinationItem<T>> = DefaultListDetailPaneHistory
): ThreePaneScaffoldNavigator<T>

Returns a remembered default implementation of ThreePaneScaffoldNavigator for ListDetailPaneScaffold, which will be updated automatically when the input values change. The default navigator is supposed to be used independently from any navigation frameworks and handles the navigation purely inside the ListDetailPaneScaffold.

Parameters
<T : Any?>

the type representing the content, or id of the content, for a navigation destination. This type must be storable in a Bundle. Used to customize navigation behavior (for example, BackNavigationBehavior). If this customization is unneeded, you can pass Nothing.

scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo())

the current layout directives to follow. The default value will be calculated with calculatePaneScaffoldDirective using WindowAdaptiveInfo retrieved from the current context.

adaptStrategies: ThreePaneScaffoldAdaptStrategies = ListDetailPaneScaffoldDefaults.adaptStrategies()

adaptation strategies of each pane.

isDestinationHistoryAware: Boolean = true

true if the scaffold value calculation should be aware of the full destination history, instead of just the current destination. See calculateThreePaneScaffoldValue for more relevant details.

initialDestinationHistory: List<ThreePaneScaffoldDestinationItem<T>> = DefaultListDetailPaneHistory

the initial pane destination history of the scaffold, by default it will be just the list pane.

rememberSupportingPaneScaffoldNavigator

@ExperimentalMaterial3AdaptiveApi
@Composable
fun rememberSupportingPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo()),
    adaptStrategies: ThreePaneScaffoldAdaptStrategies = SupportingPaneScaffoldDefaults.adaptStrategies(),
    isDestinationHistoryAware: Boolean = true
): ThreePaneScaffoldNavigator<Nothing>

Returns a remembered default implementation of ThreePaneScaffoldNavigator for SupportingPaneScaffold, which will be updated automatically when the input values change. The default navigator is supposed to be used independently from any navigation frameworks and handles the navigation purely inside the SupportingPaneScaffold.

Parameters
scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo())

the current layout directives to follow. The default value will be calculated with calculatePaneScaffoldDirective using WindowAdaptiveInfo retrieved from the current context.

adaptStrategies: ThreePaneScaffoldAdaptStrategies = SupportingPaneScaffoldDefaults.adaptStrategies()

adaptation strategies of each pane.

isDestinationHistoryAware: Boolean = true

true if the scaffold value calculation should be aware of the full destination history, instead of just the current destination. See calculateThreePaneScaffoldValue for more relevant details.

rememberSupportingPaneScaffoldNavigator

@ExperimentalMaterial3AdaptiveApi
@Composable
fun <T : Any?> rememberSupportingPaneScaffoldNavigator(
    scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo()),
    adaptStrategies: ThreePaneScaffoldAdaptStrategies = SupportingPaneScaffoldDefaults.adaptStrategies(),
    isDestinationHistoryAware: Boolean = true,
    initialDestinationHistory: List<ThreePaneScaffoldDestinationItem<T>> = DefaultSupportingPaneHistory
): ThreePaneScaffoldNavigator<T>

Returns a remembered default implementation of ThreePaneScaffoldNavigator for SupportingPaneScaffold, which will be updated automatically when the input values change. The default navigator is supposed to be used independently from any navigation frameworks and handles the navigation purely inside the SupportingPaneScaffold.

Parameters
<T : Any?>

the type representing the content, or id of the content, for a navigation destination. This type must be storable in a Bundle. Used to customize navigation behavior (for example, BackNavigationBehavior). If this customization is unneeded, you can pass Nothing.

scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfo())

the current layout directives to follow. The default value will be calculated with calculatePaneScaffoldDirective using WindowAdaptiveInfo retrieved from the current context.

adaptStrategies: ThreePaneScaffoldAdaptStrategies = SupportingPaneScaffoldDefaults.adaptStrategies()

adaptation strategies of each pane.

isDestinationHistoryAware: Boolean = true

true if the scaffold value calculation should be aware of the full destination history, instead of just the current destination. See calculateThreePaneScaffoldValue for more relevant details.

initialDestinationHistory: List<ThreePaneScaffoldDestinationItem<T>> = DefaultSupportingPaneHistory

the initial destination history of the scaffold, by default it will be just the main pane.