Start native apps faster with the Composables CLI ->
Class

PaneExpansionAnchor

The implementations of this interface represent different types of anchors of pane expansion dragging.

Source set: Common
sealed class PaneExpansionAnchor

The implementations of this interface represent different types of anchors of pane expansion dragging. Setting up anchors when create PaneExpansionState will force user dragging to snap to the set anchors after user releases the drag.

Properties

description

Source set: Common
@get:Composable abstract val description: String

The description of the anchor that will be used in androidx.compose.ui.semantics.SemanticsProperties like accessibility services.

Members

Proportion

Source set: Common
class Proportion(@FloatRange(0.0, 1.0) val proportion: Float) : PaneExpansionAnchor()

PaneExpansionAnchor implementation that specifies the anchor position in the proportion of the total size of the layout at the start side of the anchor.

Parameters

proportion the proportion of the layout at the start side of the anchor. For example, if the current layout from the start to the end is list-detail, when the proportion value is 0.3 and this anchor is used, the list pane will occupy 30% of the layout and the detail pane will occupy 70% of it.

Properties

type

Source set: Common
override val type = ProportionType

description

Source set: Common
override val description

description

Source set: Common
override val CompositionLocalConsumerModifierNode.description: String

Functions

positionIn

Source set: Common
override fun positionIn(totalSizePx: Int, density: Density) =
            (totalSizePx * proportion).roundToInt().coerceIn(0, totalSizePx)

toString

Source set: Common
override fun toString(): String

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

Offset

Source set: Common
abstract class Offset internal constructor(val offset: Dp, override internal val type: Int) :
        PaneExpansionAnchor()

PaneExpansionAnchor implementation that specifies the anchor position based on the offset in Dp.

Properties

direction

Source set: Common
val direction: Direction = Direction(type)

Indicates the direction of the offset.

Functions

toString

Source set: Common
override fun toString(): String

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

Members

Direction

Source set: Common
class Direction internal constructor(internal val value: Int)

Represents the direction from where the offset will be calculated.

Members

Companion

Source set: Common
companion object

Properties

FromStart

Source set: Common
val FromStart = Direction(OffsetFromStartType)

Indicates the offset will be calculated from the start. For example, if the offset is 150.dp, the resulted anchor will be at the position that is 150dp away from the start side of the associated layout.

FromEnd

Source set: Common
val FromEnd = Direction(OffsetFromEndType)

Indicates the offset will be calculated from the end. For example, if the offset is 150.dp, the resulted anchor will be at the position that is 150dp away from the end side of the associated layout.

Companion

Source set: Common
companion object

Functions

fromStart

Source set: Common
fun fromStart(offset: Dp): Offset

Create an androidx.compose.material3.adaptive.layout.PaneExpansionAnchor.Offset anchor from the start side of the layout.

Parameters

offset offset to be used in Dp.

fromEnd

Source set: Common
fun fromEnd(offset: Dp): Offset

Create an androidx.compose.material3.adaptive.layout.PaneExpansionAnchor.Offset anchor from the end side of the layout.

Parameters

offset offset to be used in Dp.