Compose Unstyled 2.0 is out! Check the official announcement blog ->
Interface

PaneScaffoldHorizontalOrder

Represents the horizontal order of panes in a pane scaffold.

Source set: Common
@ExperimentalMaterial3AdaptiveApi
sealed interface PaneScaffoldHorizontalOrder<Role : PaneScaffoldRole>

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.

Properties

size

Source set: Common
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.

Last updated: