animatedItems
fun <T> LazyListScope.animatedItems(items: List<T>, key: (item: T) -> Any? = null, contentType: (item: T) -> Any? = { null }, itemContent: @Composable LazyItemScope.(item: T) -> Unit)(source)
items whose every item enters with the screen's cascade, in list order, and moves with animateItem when the list changes: a list's whole entrance in one call.
LazyColumn {
animatedItems(apps, key = { it.packageName }) { app -> AppRow(app) }
}Content copied to clipboard
Toolkit components inside an item, such as preference rows, do not enter a second time.
fun <T> LazyGridScope.animatedItems(items: List<T>, key: (item: T) -> Any? = null, span: LazyGridItemSpanScope.(item: T) -> GridItemSpan? = null, contentType: (item: T) -> Any? = { null }, itemContent: @Composable LazyGridItemScope.(item: T) -> Unit)(source)
items of a grid, entering as LazyListScope.animatedItems does.