ScalingLazyListItemInfo

sealed interface ScalingLazyListItemInfo


Contains useful information about an individual item in a ScalingLazyColumn.

Summary

Public properties

Float

How much alpha has been applied to the item, between 0 and 1

Int

The index of the item in the list.

Any

The key of the item which was passed to the item() or items() function.

Int

The main axis offset of the item after adjustment for scaling of the items in the viewport.

Float

How much scaling has been applied to the item, between 0 and 1

Int

The scaled/adjusted main axis size of the item.

Int

The main axis offset of the item before adjustment for scaling of the items in the viewport.

Int

The original (before scaling) size of the list item

Public properties

alpha

Added in 1.0.0
Deprecated in 1.2.0
val alphaFloat

How much alpha has been applied to the item, between 0 and 1

index

Added in 1.0.0
Deprecated in 1.2.0
val indexInt

The index of the item in the list.

key

Added in 1.0.0
Deprecated in 1.2.0
val keyAny

The key of the item which was passed to the item() or items() function.

offset

Added in 1.0.0
Deprecated in 1.2.0
val offsetInt

The main axis offset of the item after adjustment for scaling of the items in the viewport.

The offset is relative to the center-line of the viewport of the lazy list container and takes the ScalingLazyListAnchorType into account.

For ScalingLazyListAnchorType.ItemCenter the offset is from the center of the list item to the center-line of the viewport.

For ScalingLazyListAnchorType.ItemStart if is the offset between the start (edge) of the item and the center-line of the viewport, for normal layout this will be the top edge of the item, for reverseLayout it will be the bottom edge.

A positive value indicates that the item's anchor point is below the viewport center-line, a negative value indicates that the item anchor point is above the viewport center-line.

scale

Added in 1.0.0
Deprecated in 1.2.0
val scaleFloat

How much scaling has been applied to the item, between 0 and 1

size

Added in 1.0.0
Deprecated in 1.2.0
val sizeInt

The scaled/adjusted main axis size of the item. Note that if you emit multiple layouts in the composable slot for the item then this size will be calculated as the sum of their sizes.

unadjustedOffset

Added in 1.0.0
Deprecated in 1.2.0
val unadjustedOffsetInt

The main axis offset of the item before adjustment for scaling of the items in the viewport.

The offset is relative to the center-line of the viewport of the lazy list container and takes the ScalingLazyListAnchorType into account.

For ScalingLazyListAnchorType.ItemCenter the offset is from the center of the list item to the center-line of the viewport.

For ScalingLazyListAnchorType.ItemStart if is the offset between the start (edge) of the item and the center-line of the viewport, for normal layout this will be the top edge of the item, for reverseLayout it will be the bottom edge.

unadjustedSize

Added in 1.0.0
Deprecated in 1.2.0
val unadjustedSizeInt

The original (before scaling) size of the list item