TvLazyListItemScope


@TvLazyListScopeMarker
sealed interface TvLazyListItemScope


Summary

Public functions

Modifier

This modifier animates the item placement within the Lazy list.

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

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.

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

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 minimum height to be equal to the maximum height multiplied by fraction.

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

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 functions

animateItemPlacement

@ExperimentalFoundationApi
fun Modifier.animateItemPlacement(
    animationSpec: FiniteAnimationSpec<IntOffset> = spring( stiffness = Spring.StiffnessMediumLow, visibilityThreshold = IntOffset.VisibilityThreshold )
): Modifier

This modifier animates the item placement within the Lazy list.

When you provide a key via TvLazyListScope.item/TvLazyListScope.items this modifier will enable item reordering animations. Aside from item reordering all other position changes caused by events like arrangement or alignment changes will also be animated.

Parameters
animationSpec: FiniteAnimationSpec<IntOffset> = spring( stiffness = Spring.StiffnessMediumLow, visibilityThreshold = IntOffset.VisibilityThreshold )

a finite animation that will be used to animate the item placement.

fillParentMaxHeight

fun Modifier.fillParentMaxHeight(
    fraction: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f
): 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. fraction must be between 0 and 1.

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

fun Modifier.fillParentMaxSize(
    fraction: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f
): 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 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 available space. fraction must be between 0 and 1.

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

fun Modifier.fillParentMaxWidth(
    fraction: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f
): 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. fraction must be between 0 and 1.

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.