Google is committed to advancing racial equity for Black communities. See how.

LazyItemScope

@Stable interface LazyItemScope
androidx.compose.foundation.lazy.LazyItemScope

Receiver scope being used by the item content parameter of LazyColumn/Row.

Summary

Public methods
abstract Modifier
Modifier.fillParentMaxHeight(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill the Constraints.maxHeight of the incoming measurement constraints by setting the minimum height to be equal to the maximum height multiplied by fraction.

abstract Modifier
Modifier.fillParentMaxSize(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill the Constraints.maxWidth and Constraints.maxHeight of the parent measurement constraints by setting the minimum width to be equal to the maximum width multiplied by fraction and the minimumheight to be equal to the maximum height multiplied by fraction.

abstract Modifier
Modifier.fillParentMaxWidth(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill the Constraints.maxWidth of the parent measurement constraints by setting the minimum width to be equal to the maximum width multiplied by fraction.

Public methods

fillParentMaxHeight

abstract fun Modifier.fillParentMaxHeight(@FloatRange(0.0, 1.0) fraction: Float = 1f): Modifier

Have the content fill the Constraints.maxHeight of the incoming measurement constraints by setting the minimum height to be equal to the maximum height multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make the content fill the whole parent height.

Regular Modifier.fillMaxHeight can't work inside the scrolling vertically layouts as the items are measured with Constraints.Infinity as the constraints for the main axis.

fillParentMaxSize

abstract fun Modifier.fillParentMaxSize(@FloatRange(0.0, 1.0) fraction: Float = 1f): Modifier

Have the content fill the Constraints.maxWidth and Constraints.maxHeight of the parent measurement constraints by setting the minimum width to be equal to the maximum width multiplied by fraction and the minimumheight to be equal to the maximum height multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make the content fill the whole available space.

Regular Modifier.fillMaxSize can't work inside the scrolling layouts as the items are measured with Constraints.Infinity as the constraints for the main axis.

fillParentMaxWidth

abstract fun Modifier.fillParentMaxWidth(@FloatRange(0.0, 1.0) fraction: Float = 1f): Modifier

Have the content fill the Constraints.maxWidth of the parent measurement constraints by setting the minimum width to be equal to the maximum width multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make the content fill the whole parent width.

Regular Modifier.fillMaxWidth can't work inside the scrolling horizontally layouts as the items are measured with Constraints.Infinity as the constraints for the main axis.