MeasurePolicy

fun interface MeasurePolicy

How a container measures and places its children.

A policy is handed one Measurable per child and the Constraints the container was given, measures each child under constraints of its own working out, and answers with the extent it occupies and the placement of what it measured.

Row, Column and Box are each written as one of these.

Functions

Link copied to clipboard

The height beyond which growing measurables no longer reduces their width at width.

Link copied to clipboard

The width beyond which growing measurables no longer reduces their height at height.

Link copied to clipboard
abstract fun MeasureScope.measure(measurables: List<Measurable>, constraints: Constraints): MeasureResult

Measures measurables under constraints and answers the extent this container occupies, along with where each measured child goes inside it.

Link copied to clipboard

The smallest height that lets measurables paint correctly when they are width wide.

Link copied to clipboard

The smallest width that lets measurables paint correctly when they are height tall.