Compose Modifier

layout

Creates a LayoutModifier that allows changing how the wrapped element is measured and laid out.

layout

Source set: Common
public fun Modifier.layout(
    measure: MeasureScope.(Measurable, Constraints) -> MeasureResult
): Modifier

Creates a LayoutModifier that allows changing how the wrapped element is measured and laid out.

This is a convenience API of creating a custom LayoutModifier modifier, without having to create a class or an object that implements the LayoutModifier interface. The intrinsic measurements follow the default logic provided by the LayoutModifier.

Example usage:

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: