The second Android 11 Developer Preview is now available, test it out and share your feedback.

MeasureBlocks

interface MeasureBlocks
androidx.ui.core.LayoutNode.MeasureBlocks

Summary

Public methods

abstract IntPx
maxIntrinsicHeight(density: Density, measurables: List<IntrinsicMeasurable>, w: IntPx, layoutDirection: LayoutDirection)

The lambda used to calculate IntrinsicMeasurable.maxIntrinsicHeight.

abstract IntPx
maxIntrinsicWidth(density: Density, measurables: List<IntrinsicMeasurable>, h: IntPx, layoutDirection: LayoutDirection)

The function used to calculate IntrinsicMeasurable.maxIntrinsicWidth.

abstract MeasureScope.LayoutResult
measure(measureScope: MeasureScope, measurables: List<Measurable>, constraints: Constraints, layoutDirection: LayoutDirection)

The function used to measure the child.

abstract IntPx
minIntrinsicHeight(density: Density, measurables: List<IntrinsicMeasurable>, w: IntPx, layoutDirection: LayoutDirection)

The lambda used to calculate IntrinsicMeasurable.minIntrinsicHeight.

abstract IntPx
minIntrinsicWidth(density: Density, measurables: List<IntrinsicMeasurable>, h: IntPx, layoutDirection: LayoutDirection)

The function used to calculate IntrinsicMeasurable.minIntrinsicWidth.

Public methods

maxIntrinsicHeight

abstract fun maxIntrinsicHeight(
    density: Density,
    measurables: List<IntrinsicMeasurable>,
    w: IntPx,
    layoutDirection: LayoutDirection
): IntPx

The lambda used to calculate IntrinsicMeasurable.maxIntrinsicHeight.

maxIntrinsicWidth

abstract fun maxIntrinsicWidth(
    density: Density,
    measurables: List<IntrinsicMeasurable>,
    h: IntPx,
    layoutDirection: LayoutDirection
): IntPx

The function used to calculate IntrinsicMeasurable.maxIntrinsicWidth.

measure

abstract fun measure(
    measureScope: MeasureScope,
    measurables: List<Measurable>,
    constraints: Constraints,
    layoutDirection: LayoutDirection
): MeasureScope.LayoutResult

The function used to measure the child. It must call MeasureScope.layout before completing.

minIntrinsicHeight

abstract fun minIntrinsicHeight(
    density: Density,
    measurables: List<IntrinsicMeasurable>,
    w: IntPx,
    layoutDirection: LayoutDirection
): IntPx

The lambda used to calculate IntrinsicMeasurable.minIntrinsicHeight.

minIntrinsicWidth

abstract fun minIntrinsicWidth(
    density: Density,
    measurables: List<IntrinsicMeasurable>,
    h: IntPx,
    layoutDirection: LayoutDirection
): IntPx

The function used to calculate IntrinsicMeasurable.minIntrinsicWidth.