LazyListItemInfo

interface LazyListItemInfo : ComposableProperties<LazyListItemInfo>

包含有关惰性列表(如 LazyColumnLazyRow)中单个项目(Item)的有用信息。

Author

M8Test, [email protected], https://m8test.com

See also

Functions

Link copied to clipboard
abstract fun getIndex(): Int

获取此项目在列表中的索引。

Link copied to clipboard
abstract fun getKey(): Any

获取在 item()items() 函数中为此项目传递的唯一键(Key)。

Link copied to clipboard
abstract fun getOffset(): Int

获取此项目在主轴方向上的偏移量(以像素为单位)。 该偏移量是相对于惰性列表容器的起始位置计算的。

Link copied to clipboard
abstract fun getSize(): Int

获取此项目在主轴方向上的尺寸大小(以像素为单位)。 请注意,如果您在项目对应的 Composable 插槽中放置了多个布局, 此尺寸将计算为它们尺寸的总和。