androidx.compose.foundation.layout
fillMaxWidth
Function · from org.jetbrains.compose.foundation:foundation-layout:1.12.2
No hand-written docs yet.
Have the content fill (possibly only partially) the Constraints.maxWidth of the incoming measurement constraints, by setting the [minimum width]Constraints.minWidth and the [maximum width]Constraints.maxWidth to be equal to the [maximum width]Constraints.maxWidth multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make the content fill the whole available width. If the incoming maximum width is Constraints.Infinity this modifier will have no effect.
Parameters
fun Modifier.fillMaxWidth(
fraction: Float = 1f,
)
fraction: FloatOptional
fraction: FloatOptionalDefault: 1f
The fraction of the maximum width to use, between 0 and 1, inclusive. Example usage:
Library docs
Have the content fill (possibly only partially) the Constraints.maxWidth of the incoming
measurement constraints, by setting the [minimum width]Constraints.minWidth and the
[maximum width]Constraints.maxWidth to be equal to the [maximum width]Constraints.maxWidth
multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make
the content fill the whole available width. If the incoming maximum width is
Constraints.Infinity this modifier will have no effect.