TvLazyGridItemInfo

sealed interface TvLazyGridItemInfo


Contains useful information about an individual item in lazy grids like TvLazyVerticalGrid.

Summary

Constants

const Int

Possible value for column, when they are unknown.

const Int

Possible value for row, when they are unknown.

Public properties

Int

The column occupied by the top start point of the item.

Any?

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

Int

The index of the item in the grid.

Any

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

IntOffset

The offset of the item in pixels.

Int

The row occupied by the top start point of the item.

IntSize

The pixel size of the item.

Constants

UnknownColumn

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
const val UnknownColumnInt

Possible value for column, when they are unknown. This can happen when the item is visible while animating to exit the viewport.

UnknownRow

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
const val UnknownRowInt

Possible value for row, when they are unknown. This can happen when the item is visible while animating to exit the viewport.

Public properties

column

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val columnInt

The column occupied by the top start point of the item. If this is unknown, for example while this item is animating to exit the viewport and is still visible, the value will be UnknownColumn.

contentType

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val contentTypeAny?

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

index

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val indexInt

The index of the item in the grid.

key

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val keyAny

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

offset

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val offsetIntOffset

The offset of the item in pixels. It is relative to the top start of the lazy grid container.

row

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val rowInt

The row occupied by the top start point of the item. If this is unknown, for example while this item is animating to exit the viewport and is still visible, the value will be UnknownRow.

size

Added in 1.0.0-alpha11
Deprecated in 1.0.0-alpha11
val sizeIntSize

The pixel 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 max of their sizes.