Constrain

@Stable data class Constrain : LayoutModifier
kotlin.Any
   ↳ androidx.ui.layout.LayoutWidth.Constrain

Modifies the width of a Compose UI layout element to be at least minWidth and at most maxWidth wide if permitted by its parent.

This modifies the incoming Constraints provided by a layout element's parent. If the incoming constraints do not allow the modified size, the incoming constraints from the parent will restrict the final size.

Summary

Public constructors

<init>(minWidth: Dp, maxWidth: Dp)

Modifies the width of a Compose UI layout element to be at least minWidth and at most maxWidth wide if permitted by its parent.

Properties

Dp

Dp

Public constructors

<init>

Constrain(
    minWidth: Dp,
    maxWidth: Dp)

Modifies the width of a Compose UI layout element to be at least minWidth and at most maxWidth wide if permitted by its parent.

This modifies the incoming Constraints provided by a layout element's parent. If the incoming constraints do not allow the modified size, the incoming constraints from the parent will restrict the final size.

Properties

maxWidth

val maxWidth: Dp

minWidth

val minWidth: Dp