androidx.compose.foundation.lazy
LazyItemScope
Interface · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
Receiver scope being used by the item content parameter of LazyColumn/Row.
interface LazyItemScope
Used by
Parameters that take a LazyItemScope.
itemsIndexed(itemContent)LazyListScope.item(content)LazyListScope.items(itemContent)LazyListScope.stickyHeader(content)
Functions
fillParentMaxSize
fun Modifier.fillParentMaxSize(
fraction: Float = 1f,
): Modifier
Have the content fill the Constraints.maxWidth and Constraints.maxHeight of the parent measurement constraints by setting the [minimum width]Constraints.minWidth to be equal to the [maximum width]Constraints.maxWidth multiplied by fraction and the [minimum height]Constraints.minHeight to be equal to the [maximum height]Constraints.maxHeight multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make the content fill the whole available space. fraction must be between 0 and 1.
fillParentMaxWidth
fun Modifier.fillParentMaxWidth(
fraction: Float = 1f,
): Modifier
Have the content fill the Constraints.maxWidth of the parent measurement constraints by setting the [minimum width]Constraints.minWidth 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 parent width. fraction must be between 0 and 1.
fillParentMaxHeight
fun Modifier.fillParentMaxHeight(
fraction: Float = 1f,
): Modifier
Have the content fill the Constraints.maxHeight of the incoming measurement constraints by setting the [minimum height]Constraints.minHeight to be equal to the [maximum height]Constraints.maxHeight multiplied by fraction. Note that, by default, the fraction is 1, so the modifier will make the content fill the whole parent height. fraction must be between 0 and 1.
animateItem
fun Modifier.animateItem(
fadeInSpec: FiniteAnimationSpec<Float>? = spring(stiffness = Spring.StiffnessMediumLow),
placementSpec: FiniteAnimationSpec<IntOffset>? = spring(stiffness = Spring.StiffnessMediumLow, visibilityThreshold = IntOffset.VisibilityThreshold),
fadeOutSpec: FiniteAnimationSpec<Float>? = spring(stiffness = Spring.StiffnessMediumLow),
): Modifier
This modifier animates the item appearance (fade in), disappearance (fade out) and placement changes (such as an item reordering).
Library docs
Receiver scope being used by the item content parameter of LazyColumn/Row.