LazyListItemInfo


public interface LazyListItemInfo


Contains useful information about an individual item in a VerticalList.

Summary

Public methods

abstract Object

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

abstract int

The index of the item in the list.

abstract @NonNull Object

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

abstract int

The main axis offset of the item in pixels.

abstract int

The main axis size of the item in pixels.

Public methods

getContentType

Added in 1.0.0-alpha01
abstract Object getContentType()

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

getIndex

Added in 1.0.0-alpha01
abstract int getIndex()

The index of the item in the list.

getKey

Added in 1.0.0-alpha01
abstract @NonNull Object getKey()

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

getOffset

Added in 1.0.0-alpha01
abstract int getOffset()

The main axis offset of the item in pixels. It is relative to the start of the lazy list container.

getSize

Added in 1.0.0-alpha01
abstract int getSize()

The main axis size of the item in pixels. 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.