Interface

SubspaceMeasurable

A part of the composition layout that can be measured.

Source set: Android
public interface SubspaceMeasurable

A part of the composition layout that can be measured.

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

Functions

measure

Source set: Android
public fun measure(constraints: VolumeConstraints): SubspacePlaceable

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

Parameters

constraints constraints to be applied during the measurement of this layout.

adjustParams

Source set: Android
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) }

Parameters

params layout parameters to be adjusted by this measurable.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: