androidx.compose.material3.adaptive.layout
PaneScaffoldDirective
Class · from org.jetbrains.compose.material3.adaptive:adaptive-layout:1.3.0
No hand-written docs yet.
Top-level directives about how a pane scaffold should be arranged and spaced, like how many partitions the layout can be split into and what should be the gutter size.
class PaneScaffoldDirective(
maxHorizontalPartitions: Int,
horizontalPartitionSpacerSize: Dp,
maxVerticalPartitions: Int,
verticalPartitionSpacerSize: Dp,
defaultPanePreferredWidth: Dp,
defaultPanePreferredHeight: Dp,
excludedBounds: List<Rect>,
shouldAutoFocusCurrentDestination: Boolean,
)
How to get one
Create it
PaneScaffoldDirective(maxHorizontalPartitions, horizontalPartitionSpacerSize, maxVerticalPartitions, verticalPartitionSpacerSize, defaultPanePreferredWidth, defaultPanePreferredHeight, excludedBounds, shouldAutoFocusCurrentDestination)constructor
Ready-made values and functions that return it
ThreePaneScaffoldNavigator:scaffoldDirectivecalculatePaneScaffoldDirective()expcalculatePaneScaffoldDirectiveWithTwoPanesOnMediumWidth()exp
Used by
Parameters that take a PaneScaffoldDirective.
ListDetailPaneScaffold(directive)SupportingPaneScaffold(directive)AdaptStrategy.Levitate.onlyIfSinglePane(scaffoldDirective)rememberListDetailPaneScaffoldNavigator(scaffoldDirective)rememberSupportingPaneScaffoldNavigator(scaffoldDirective)
Properties
Default
val Default: PaneScaffoldDirective
A default instance of PaneScaffoldDirective that suggests a single-pane layout that occupies the full window. To create a customized PaneScaffoldDirective, you can use PaneScaffoldDirective.copy on the default instance to create a copy with custom values.
maxHorizontalPartitions
val maxHorizontalPartitions: Int
horizontalPartitionSpacerSize
val horizontalPartitionSpacerSize: Dp
maxVerticalPartitions
val maxVerticalPartitions: Int
verticalPartitionSpacerSize
val verticalPartitionSpacerSize: Dp
defaultPanePreferredWidth
val defaultPanePreferredWidth: Dp
defaultPanePreferredHeightSince 1.1
val defaultPanePreferredHeight: Dp
excludedBounds
val excludedBounds: List<Rect>
shouldAutoFocusCurrentDestinationSince 1.3
val shouldAutoFocusCurrentDestination: Boolean
Functions
copy
fun copy(
maxHorizontalPartitions: Int = this.maxHorizontalPartitions,
horizontalPartitionSpacerSize: Dp = this.horizontalPartitionSpacerSize,
maxVerticalPartitions: Int = this.maxVerticalPartitions,
verticalPartitionSpacerSize: Dp = this.verticalPartitionSpacerSize,
defaultPanePreferredWidth: Dp = this.defaultPanePreferredWidth,
excludedBounds: List<Rect> = this.excludedBounds,
defaultPanePreferredHeight: Dp = this.defaultPanePreferredHeight,
): PaneScaffoldDirective
Returns a new copy of PaneScaffoldDirective with specified fields overwritten. Use this method to create a custom PaneScaffoldDirective from the default instance or the result of calculatePaneScaffoldDirective.
Library docs
Top-level directives about how a pane scaffold should be arranged and spaced, like how many partitions the layout can be split into and what should be the gutter size.