The Android Developer Challenge is back! Submit your idea before December 2.

LayoutModifier

interface LayoutModifier : Modifier.Element
androidx.ui.core.LayoutModifier

A Modifier.Element that changes the way a UI component is measured and laid out.

Summary

Public methods

abstract IntPx

Determines the modified maximum intrinsic height of measurable.

abstract IntPx

Determines the modified maximum intrinsic width of measurable.

abstract IntPx

Determines the modified minimum intrinsic height of measurable.

abstract IntPx

Determines the modified minimum intrinsic width of measurable.

abstract IntPx?

Returns the modified position of line given its unmodified value.

abstract Constraints

Modifies constraints for performing measurement of the modified layout element.

abstract Any?

Provides a parentData given the parentData already provided through the modifier's chain.

abstract IntPxPosition
DensityScope.modifyPosition(childPosition: IntPxPosition, childSize: IntPxSize, containerSize: IntPxSize)

Returns the position of a modified child of size childSize within a container of size containerSize.

abstract IntPxSize
DensityScope.modifySize(constraints: Constraints, childSize: IntPxSize)

Returns the container size of a modified layout element given the original container measurement constraints and the measured childSize.

Inherited functions

Public methods

maxIntrinsicHeightOf

abstract fun DensityScope.maxIntrinsicHeightOf(
    measurable: Measurable,
    width: IntPx
): IntPx

Determines the modified maximum intrinsic height of measurable. See Measurable.maxIntrinsicHeight.

maxIntrinsicWidthOf

abstract fun DensityScope.maxIntrinsicWidthOf(
    measurable: Measurable,
    height: IntPx
): IntPx

Determines the modified maximum intrinsic width of measurable. See Measurable.maxIntrinsicWidth.

minIntrinsicHeightOf

abstract fun DensityScope.minIntrinsicHeightOf(
    measurable: Measurable,
    width: IntPx
): IntPx

Determines the modified minimum intrinsic height of measurable. See Measurable.minIntrinsicHeight.

minIntrinsicWidthOf

abstract fun DensityScope.minIntrinsicWidthOf(
    measurable: Measurable,
    height: IntPx
): IntPx

Determines the modified minimum intrinsic width of measurable. See Measurable.minIntrinsicWidth.

modifyAlignmentLine

abstract fun DensityScope.modifyAlignmentLine(
    line: AlignmentLine,
    value: IntPx?
): IntPx?

Returns the modified position of line given its unmodified value.

modifyConstraints

abstract fun DensityScope.modifyConstraints(constraints: Constraints
): Constraints

Modifies constraints for performing measurement of the modified layout element.

modifyParentData

abstract fun DensityScope.modifyParentData(parentData: Any?
): Any?

Provides a parentData given the parentData already provided through the modifier's chain.

modifyPosition

abstract fun DensityScope.modifyPosition(
    childPosition: IntPxPosition,
    childSize: IntPxSize,
    containerSize: IntPxSize
): IntPxPosition

Returns the position of a modified child of size childSize within a container of size containerSize.

modifySize

abstract fun DensityScope.modifySize(
    constraints: Constraints,
    childSize: IntPxSize
): IntPxSize

Returns the container size of a modified layout element given the original container measurement constraints and the measured childSize.