# ListDetailSceneStrategy

Artifact: [androidx.compose.material3.adaptive:adaptive-navigation3](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy.kt+class:androidx.compose.material3.adaptive.navigation3.ListDetailSceneStrategy) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0) Common/All
- Cmn

  ```
  @ExperimentalMaterial3AdaptiveApi
  class ListDetailSceneStrategy<T : Any> : SceneStrategy<T>
  ```

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy` supports arranging `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry`s into an adaptive `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`. By using `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#listPane(kotlin.Any,kotlin.Function1)`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#detailPane(kotlin.Any)`, or `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#extraPane(kotlin.Any)` in a NavEntry's metadata, entries can be assigned as belonging to a list pane, detail 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.

```kotlin
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.material3.adaptive.navigation3.ListDetailSceneStrategy
import androidx.compose.material3.adaptive.navigation3.LocalListDetailSceneScope
import androidx.compose.material3.adaptive.navigation3.rememberListDetailSceneStrategy
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.onClick
import androidx.navigation3.runtime.entryProvider
import androidx.navigation3.runtime.rememberNavBackStack
import androidx.navigation3.ui.NavDisplay

val backStack = rememberNavBackStack(HomeKey)
val sceneStrategy = rememberListDetailSceneStrategy<Any>()

val items = listOf("Item 1", "Item 2", "Item 3")
val extraItems = listOf("Extra 1", "Extra 2", "Extra 3")

val selectedIndex =
    backStack.lastOrNull()?.let {
        when (it) {
            is DetailKey -> it.index
            is ExtraKey -> it.index
            else -> null
        }
    }

NavDisplay(
    backStack = backStack,
    modifier = Modifier.fillMaxSize(),
    sceneStrategies = listOf(sceneStrategy),
    entryProvider =
        entryProvider {
            entry<HomeKey> {
                Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
                    Button(
                        onClick = { if (backStack.last() != ListKey) backStack.add(ListKey) }
                    ) {
                        Text("Go to list")
                    }
                }
            }

            entry<ListKey>(
                metadata =
                    ListDetailSceneStrategy.listPane(
                        detailPlaceholder = {
                            DetailPaneContent(selectedItem = null, onShowExtra = {})
                        }
                    )
            ) {
                ListPaneContent(
                    items = items,
                    selectedIndex = selectedIndex,
                    onItemClick = { index ->
                        val dest = DetailKey(index)
                        if (backStack.last() != dest) backStack.add(dest)
                    },
                )
            }

            entry<DetailKey>(metadata = ListDetailSceneStrategy.detailPane()) {
                val scaffoldSceneScope = LocalListDetailSceneScope.current
                DetailPaneContent(
                    selectedItem = selectedIndex?.let { items[it] },
                    onShowExtra = {
                        val dest = ExtraKey(selectedIndex!!)
                        if (backStack.last() != dest) backStack.add(dest)
                    },
                    backButton =
                        if (scaffoldSceneScope == null) {
                            // Only show back button in a single-pane context
                            { BackButton(onClick = { backStack.removeLastOrNull() }) }
                        } else null,
                )
            }

            entry<ExtraKey>(metadata = ListDetailSceneStrategy.extraPane()) {
                val scaffoldSceneScope = LocalListDetailSceneScope.current
                ExtraPaneContent(
                    item = extraItems[selectedIndex!!],
                    backButton =
                        if (scaffoldSceneScope == null) {
                            // Only show back button in a single-pane context
                            { BackButton(onClick = { backStack.removeLastOrNull() }) }
                        } else null,
                )
            }
        },
)
```

## Summary

| ### Public companion functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#detailPane(kotlin.Any)(sceneKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` Constructs metadata to mark a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` as belonging to a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldRole#Detail()` within a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#extraPane(kotlin.Any)(sceneKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` Constructs metadata to mark a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` as belonging to an `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldRole#Extra()` within a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#listPane(kotlin.Any,kotlin.Function1)(sceneKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html, detailPlaceholder: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Constructs metadata to mark a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` as belonging to a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldRole#List()` within a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#paneAnimation(androidx.compose.animation.EnterTransition,androidx.compose.animation.ExitTransition,androidx.compose.animation.core.FiniteAnimationSpec)( enterTransition: https://developer.android.com/reference/kotlin/androidx/compose/animation/EnterTransition?, exitTransition: https://developer.android.com/reference/kotlin/androidx/compose/animation/ExitTransition?, boundsAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/FiniteAnimationSpec<https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntRect>? )` Constructs metadata to customize the animation of panes within a list-detail scaffold. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#preferredPaneSize(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)(width: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, height: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` Constructs metadata to set the preferred size of a pane within a list-detail scaffold, defined in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`s. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#preferredPaneSize(kotlin.Float,kotlin.Float)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Constructs metadata to set the preferred size of a pane within a list-detail scaffold, defined as a fraction of the total scaffold size. | Cmn |

| ### Public constructors |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#ListDetailSceneStrategy(kotlin.Boolean,androidx.compose.material3.adaptive.navigation.BackNavigationBehavior,androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldAdaptStrategies,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)( shouldHandleSinglePaneLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, backNavigationBehavior: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation/BackNavigationBehavior, directive: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective, adaptStrategies: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldAdaptStrategies, paneExpansionDragHandle: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldScope.(https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, paneExpansionState: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState? )` | Cmn |

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/navigation3/scene/Scene<T>?` | `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategyScope<T>.https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#(androidx.navigation3.scene.SceneStrategyScope).calculateScene(kotlin.collections.List)(entries: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry<T>>)` Given a `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategyScope`, calculate whether this `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy` should take on the task of rendering one or more of the entries in the scope. | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldAdaptStrategies` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#adaptStrategies()` adaptation strategies of each pane, which denotes how each pane should be adapted if they can't fit on screen in the `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue#Expanded()` state. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation/BackNavigationBehavior` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#backNavigationBehavior()` the behavior describing which backstack entries may be skipped during the back navigation. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#directive()` The top-level directives about how the list-detail scaffold should arrange its panes. | Cmn |
| `(@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldScope.(https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#paneExpansionDragHandle()` when two panes are displayed side-by-side, a non-null drag handle allows users to resize the panes and change the pane expansion state. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState?` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#paneExpansionState()` the state object of pane expansion. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#shouldHandleSinglePaneLayout()` whether `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy` should apply when only a single pane is displayed. | Cmn |

### Inherited functions

From [androidx.navigation3.scene.SceneStrategy](https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy) `open infix https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy<T>` `[then](https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy#then(androidx.navigation3.scene.SceneStrategy))(sceneStrategy: https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy<T>)`

**This function is deprecated.** Deprecated in favor of List\<SceneStrategy\> APIs that take the output of this operator has been refactored to take a list of strategies instead.
Cmn

## Public companion functions

### detailPane

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
fun detailPane(sceneKey: Any = Unit): Map<String, Any>
```

Constructs metadata to mark a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` as belonging to a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldRole#Detail()` within a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`.

| Parameters |
|---|---|
| `sceneKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html = Unit` | the key to distinguish the scene of the list-detail scaffold, in case multiple list-detail scaffolds are supported within the same NavDisplay. |

### extraPane

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
fun extraPane(sceneKey: Any = Unit): Map<String, Any>
```

Constructs metadata to mark a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` as belonging to an `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldRole#Extra()` within a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`.

| Parameters |
|---|---|
| `sceneKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html = Unit` | the key to distinguish the scene of the list-detail scaffold, in case multiple list-detail scaffolds are supported within the same NavDisplay. |

### listPane

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
fun listPane(sceneKey: Any = Unit, detailPlaceholder: @Composable ThreePaneScaffoldScope.() -> Unit = {}): Map<String, Any>
```

Constructs metadata to mark a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` as belonging to a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldRole#List()` within a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`.

| Parameters |
|---|---|
| `sceneKey: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html = Unit` | the key to distinguish the scene of the list-detail scaffold, in case multiple list-detail scaffolds are supported within the same NavDisplay. |
| `detailPlaceholder: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | composable content to display in the detail pane in case there is no other `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry` representing a detail pane in the backstack. Note that this content does not receive the same scoping mechanisms as a full-fledged `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry`. |

### paneAnimation

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
fun paneAnimation(
    enterTransition: EnterTransition? = null,
    exitTransition: ExitTransition? = null,
    boundsAnimationSpec: FiniteAnimationSpec<IntRect>? = null
): Map<String, Any>
```

Constructs metadata to customize the animation of panes within a list-detail scaffold.

If the value is null or unset, the default motions defined in `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneMotionDefaults` will be used instead.

| Parameters |
|---|---|
| `enterTransition: https://developer.android.com/reference/kotlin/androidx/compose/animation/EnterTransition? = null` | The `https://developer.android.com/reference/kotlin/androidx/compose/animation/EnterTransition` used to animate the pane in. |
| `exitTransition: https://developer.android.com/reference/kotlin/androidx/compose/animation/ExitTransition? = null` | The `https://developer.android.com/reference/kotlin/androidx/compose/animation/ExitTransition` used to animate the pane out. |
| `boundsAnimationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/FiniteAnimationSpec<https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntRect>? = null` | The `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/FiniteAnimationSpec` used to animate the bounds of the pane when it remains showing but changes its size and/or position. |

### preferredPaneSize

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
fun preferredPaneSize(width: Dp = Dp.Unspecified, height: Dp = Dp.Unspecified): Map<String, Any>
```

Constructs metadata to set the preferred size of a pane within a list-detail scaffold, defined in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`s.

If the value is unset or set to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Unspecified()`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective#defaultPanePreferredWidth()` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective#defaultPanePreferredHeight()` from `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#directive()` will be used instead.

| Parameters |
|---|---|
| `width: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp.Unspecified` | the preferred width of the pane, defined in Dp. The implementation will try to respect this value when the pane is rendered as a fixed pane. Note that the preferred width may be ignored when this pane has higher priority than the other panes so it is forced to fill the available width, or if the pane needs to shrink or expand to avoid intersecting with the hinge areas. |
| `height: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp.Unspecified` | the preferred height of the pane, defined in Dp. The implementation will try to respect this value when the pane is rendered in a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue.Reflowed` or `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue.Levitated` state. Note that the preferred height may be ignored when the pane is expanded to stretch the available height, or if the pane needs to shrink or expand to avoid intersecting with the hinge areas. |

### preferredPaneSize

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
fun preferredPaneSize(width: Float = Float.NaN, height: Float = Float.NaN): Map<String, Any>
```

Constructs metadata to set the preferred size of a pane within a list-detail scaffold, defined as a fraction of the total scaffold size.

If the value is unset or set to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Unspecified()`, `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective#defaultPanePreferredWidth()` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective#defaultPanePreferredHeight()` from `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#directive()` will be used instead.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Float.NaN` | the preferred width of the pane, defined as a fraction from 0.0 to 1.0 of the total scaffold width. The implementation will try to respect this value when the pane is rendered as a fixed pane. Note that the preferred width may be ignored when this pane has higher priority than the other panes so it is forced to fill the available width, or if the pane needs to shrink or expand to avoid intersecting with the hinge areas. |
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Float.NaN` | the preferred height of the pane, defined as a fraction from 0.0 to 1.0 of the total scaffold height. The implementation will try to respect this value when the pane is rendered in a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue.Reflowed` or `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue.Levitated` state. Note that the preferred height may be ignored when the pane is expanded to stretch the available height, or if the pane needs to shrink or expand to avoid intersecting with the hinge areas. |

## Public constructors

### ListDetailSceneStrategy

Cmn

```
<T : Any> ListDetailSceneStrategy(
    shouldHandleSinglePaneLayout: Boolean,
    backNavigationBehavior: BackNavigationBehavior,
    directive: PaneScaffoldDirective,
    adaptStrategies: ThreePaneScaffoldAdaptStrategies,
    paneExpansionDragHandle: (@Composable ThreePaneScaffoldScope.(PaneExpansionState) -> Unit)?,
    paneExpansionState: PaneExpansionState?
)
```

| Parameters |
|---|---|
| `shouldHandleSinglePaneLayout: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy` should apply when only a single pane is displayed. By default, this is false and instead yields to the next `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy` in the chain. If true, single pane layouts will instead be handled internally by the Material adaptive scaffold instead of the Navigation 3 system. |
| `backNavigationBehavior: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation/BackNavigationBehavior` | the behavior describing which backstack entries may be skipped during the back navigation. See `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation/BackNavigationBehavior`. |
| `directive: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldDirective` | The top-level directives about how the list-detail scaffold should arrange its panes. |
| `adaptStrategies: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldAdaptStrategies` | adaptation strategies of each pane, which denotes how each pane should be adapted if they can't fit on screen in the `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue#Expanded()` state. It is recommended to use `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldDefaults#adaptStrategies(androidx.compose.material3.adaptive.layout.AdaptStrategy,androidx.compose.material3.adaptive.layout.AdaptStrategy,androidx.compose.material3.adaptive.layout.AdaptStrategy)` as a default, but custom `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldAdaptStrategies` are supported as well. |
| `paneExpansionDragHandle: (@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldScope.(https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?` | when two panes are displayed side-by-side, a non-null drag handle allows users to resize the panes and change the pane expansion state. |
| `paneExpansionState: https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneExpansionState?` | the state object of pane expansion. If this is null but a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#paneExpansionDragHandle()` is provided, a default implementation will be created. |

## Public functions

### SceneStrategyScope.calculateScene

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive-navigation3](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy.kt+function:calculateScene) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

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

Given a `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategyScope`, calculate whether this `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy` should take on the task of rendering one or more of the entries in the scope.

By returning a non-null `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/Scene`, your `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/Scene` takes on the responsibility of rendering the set of entries you declare in `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/Scene#entries()`. If you return `null`, the next available `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy` will be called.

| Parameters |
|---|---|
| `entries: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavEntry<T>>` | The entries on the back stack that should be considered valid to render via a returned Scene. |

## Public properties

### adaptStrategies

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
val adaptStrategies: ThreePaneScaffoldAdaptStrategies
```

adaptation strategies of each pane, which denotes how each pane should be adapted if they can't fit on screen in the `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneAdaptedValue#Expanded()` state. It is recommended to use `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffoldDefaults#adaptStrategies(androidx.compose.material3.adaptive.layout.AdaptStrategy,androidx.compose.material3.adaptive.layout.AdaptStrategy,androidx.compose.material3.adaptive.layout.AdaptStrategy)` as a default, but custom `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldAdaptStrategies` are supported as well.

### backNavigationBehavior

Cmn

```
val backNavigationBehavior: BackNavigationBehavior
```

the behavior describing which backstack entries may be skipped during the back navigation. See `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation/BackNavigationBehavior`.

### directive

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
val directive: PaneScaffoldDirective
```

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

### paneExpansionDragHandle

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
val paneExpansionDragHandle: (@Composable ThreePaneScaffoldScope.(PaneExpansionState) -> Unit)?
```

when two panes are displayed side-by-side, a non-null drag handle allows users to resize the panes and change the pane expansion state.

### paneExpansionState

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
val paneExpansionState: PaneExpansionState?
```

the state object of pane expansion. If this is null but a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy#paneExpansionDragHandle()` is provided, a default implementation will be created.

### shouldHandleSinglePaneLayout

Cmn Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
val shouldHandleSinglePaneLayout: Boolean
```

whether `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/navigation3/ListDetailSceneStrategy` should apply when only a single pane is displayed. By default, this is false and instead yields to the next `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneStrategy` in the chain. If true, single pane layouts will instead be handled internally by the Material adaptive scaffold instead of the Navigation 3 system.