LayoutHeight

Modifies the height of a Compose UI layout element.
LayoutHeight(16.dp) will instruct the layout element to be exactly 16dp tall 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.

See Min, Max, Constrain and Fill to modify the height of a layout element within a
range rather than to an exact size. See LayoutWidth to modify width, or LayoutSize
to modify both width and height at once.

Example usage:

import androidx.ui.foundation.Box
import androidx.ui.layout.aspectRatio
import androidx.ui.layout.height
// The result is a 50.dp x 50.dp blue box centered in a 100.dp x 100.dp space.
// Note that although a previous modifier asked it to be 100.dp height, this
// will not be respected. They would be respected if preferredHeight was used instead of height.
Box(
Modifier
.height(100.dp)
.height(50.dp)
.aspectRatio(1f),
backgroundColor = Color.Blue
)

Public constructors

<init>

Modifies the height of a Compose UI layout element.
LayoutHeight(16.dp) will instruct the layout element to be exactly 16dp tall 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.

See Min, Max, Constrain and Fill to modify the height of a layout element within a
range rather than to an exact size. See LayoutWidth to modify width, or LayoutSize
to modify both width and height at once.

Example usage:

import androidx.ui.foundation.Box
import androidx.ui.layout.aspectRatio
import androidx.ui.layout.height
// The result is a 50.dp x 50.dp blue box centered in a 100.dp x 100.dp space.
// Note that although a previous modifier asked it to be 100.dp height, this
// will not be respected. They would be respected if preferredHeight was used instead of height.
Box(
Modifier
.height(100.dp)
.height(50.dp)
.aspectRatio(1f),
backgroundColor = Color.Blue
)