androidx.compose.material3.adaptive.layout

PaneScaffoldHorizontalOrderSince 1.2Experimental

Sealed interface · from org.jetbrains.compose.material3.adaptive:adaptive-layout:1.3.0

No hand-written docs yet.

Represents the horizontal order of panes in a pane scaffold. An implementation of this interface is supposed to represent an 1-to-1 mapping between all the possible pane roles supported by the associated pane scaffold, and those panes' index in the order. For example, ThreePaneScaffoldHorizontalOrder represents an order of three panes supported by the three pane scaffold implementations like ListDetailPaneScaffold and SupportingPaneScaffold.

sealed interface PaneScaffoldHorizontalOrder<Role : PaneScaffoldRole>

Kinds of PaneScaffoldHorizontalOrder

Anywhere a PaneScaffoldHorizontalOrder is expected, you can pass any of these.

How to get one

Or create one of the kinds listed above.

Properties

size

val size: Int

The number of panes in the order.

Functions

indexOf

fun indexOf(role: Role): Int

Returns the index of the given role in the order.

forEach

fun forEach(action: (Role) -> Unit)

Performs the given action for each pane in the order.

forEachIndexed

fun forEachIndexed(action: (Int, Role) -> Unit)

Performs the given action for each pane in the order, with its index.

forEachIndexedReversed

fun forEachIndexedReversed(action: (Int, Role) -> Unit)

Performs the given action for each pane in the order, with its index, in reverse order.

Library docs

Represents the horizontal order of panes in a pane scaffold. An implementation of this interface is supposed to represent an 1-to-1 mapping between all the possible pane roles supported by the associated pane scaffold, and those panes' index in the order. For example, ThreePaneScaffoldHorizontalOrder represents an order of three panes supported by the three pane scaffold implementations like ListDetailPaneScaffold and SupportingPaneScaffold.

Note that this class is not supposed to be used directly by developers. It's defined as public to support ThreePaneScaffoldOverride, which can be replaced in the future by other mechanisms. By then we will hide this class as well.