Known direct subclasses
FlowRowOverflowScope

Scope for the overflow FlowRow.

Known indirect subclasses

Scope for the children of FlowRow.

Summary

Public functions

Modifier
@ExperimentalLayoutApi
Modifier.fillMaxRowHeight(fraction: @FloatRange(from = 0.0, to = 1.0) Float)

Have the item fill (possibly only partially) the max height of the tallest item in the row it was placed in, within the FlowRow.

Cmn

Inherited functions

From androidx.compose.foundation.layout.RowScope
Modifier

Align the element vertically within the Row.

Cmn
Modifier
Modifier.alignBy(alignmentLineBlock: (Measured) -> Int)

Position the element vertically such that the alignment line for the content as determined by alignmentLineBlock aligns with sibling elements also configured to alignBy.

Cmn
Modifier

Position the element vertically such that its alignmentLine aligns with sibling elements also configured to alignBy.

Cmn
Modifier

Position the element vertically such that its first baseline aligns with sibling elements also configured to alignByBaseline or alignBy.

Cmn
Modifier
Modifier.weight(
    weight: @FloatRange(from = 0.0, fromInclusive = false) Float,
    fill: Boolean
)

Size the element's width proportional to its weight relative to other weighted sibling elements in the Row.

Cmn

Public functions

fillMaxRowHeight

@ExperimentalLayoutApi
fun Modifier.fillMaxRowHeight(
    fraction: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f
): Modifier

Have the item fill (possibly only partially) the max height of the tallest item in the row it was placed in, within the FlowRow.

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

FlowRow(
    Modifier.fillMaxWidth(1f).padding(20.dp).wrapContentHeight(align = Alignment.Top),
    horizontalArrangement = Arrangement.spacedBy(10.dp),
    verticalArrangement = Arrangement.spacedBy(20.dp),
    maxItemsInEachRow = 3,
) {
    repeat(9) {
        Box(Modifier.width(100.dp).background(Color.Green).fillMaxRowHeight(1f)) {
            val text = generateRandomString(IntRange(10, 50).random())
            Text(text = text, fontSize = 18.sp, modifier = Modifier.padding(3.dp))
        }
    }
}
Parameters
fraction: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f

The fraction of the max height of the tallest item between 0 and 1, inclusive.

Example usage: