Interface

SubspaceMeasurable

A part of the composition layout that can be measured.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public interface SubspaceMeasurable

A part of the composition layout that can be measured.

Based on androidx.compose.ui.layout.Measurable.

Functions

measure

public fun measure(constraints: VolumeConstraints): SubspacePlaceable

Measures the layout with VolumeConstraints, returning a SubspacePlaceable layout that has its new size.


adjustParams

public fun adjustParams(params: ParentLayoutParamsAdjustable)

Adjusts layout with a new ParentLayoutParamsAdjustable.

This is useful in implementations of SubspaceMeasurePolicy.measure to provide child measurables with the context objects they need to inform their parent of their layout preferences using ParentLayoutParamsModifier.adjustParams.

// Child composable modifiers can modify MyParams which can be read by the parent.
var myParams = MyParams().also { measurable.adjustParams(it) }