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