Expand description
Layout contracts & policies for Cranpose
Modules§
Structs§
- Alignment
- Alignment across both axes used for positioning content within a box.
- Alignment
Lines - Text baselines measured down from a layout’s top edge.
- Constraints
- Constraints used during layout measurement.
- Flex
Parent Data - Parent data for flex layouts (Row/Column weights and alignment).
- Layout
Modifier Measure Result - Result of a layout modifier measurement operation.
- Measure
Result - Result of a measurement operation.
- Measurement
- The size and explicit alignment lines produced by a measure policy.
- Parent
Data - Layout metadata supplied by a child for its direct parent.
- Placeable
- Result of running a measurement pass for a single child.
- Placement
- Placement information for a measured child.
Enums§
- Axis
- Represents the primary axis of flex layout (Row or Column).
- Horizontal
Alignment - Alignment along the horizontal axis.
- Intrinsic
Size - Specifies how to size a component based on its intrinsic measurements.
- Linear
Arrangement - Arrangement strategy matching Jetpack Compose’s linear arrangements.
- Vertical
Alignment - Alignment along the vertical axis.
Traits§
- Arrangement
- Trait implemented by arrangement strategies that distribute children on an axis.
- Axis
Alignment - An alignment along one axis, which places a block at a bias of the space left beside it.
- Measurable
- Object capable of measuring a layout child and exposing intrinsic sizes.
- Measure
Policy - Policy responsible for measuring and placing children.
- Measure
Scope - Scope for measurement operations.
- Place
Target - What a node-backed
Placeabletells when its parent places it.
Functions§
- bias_
offset - Compose’s
BiasAlignment: the offset that putschildatbiasofavailable(-1 the start, 0 the middle, 1 the end), on a whole device pixel ofdensityas Kotlin’sroundToIntrounds it, and before the start when the child is the larger. - ceil_
to_ px - A length moved up onto the next whole device pixel, as Compose sizes
text: a layout’s size is its paragraph’s,
ceiled, so it never clips. - round_
to_ px - A length moved onto the whole device pixel Compose would give it.