Interface

PaneScaffoldHorizontalOrder

Represents the horizontal order of panes in a pane scaffold.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
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.

Properties

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.