I am trying to achieve something like this but with Jetpack Compose. In other words swipe to delete like we could do in RecyclerView
with ItemTouchHelper
and class DiffCallBack : DiffUtil.ItemCallback<RvModel>()
where we could see enter - exit animations
and then the list moving gracefully up or down where the item has been inserted or removed.
This is what I have tried:
LazyColumn(state = listState) {
items(products, {listItem:InventoryEntity -> listItem.inventoryId}) { item ->
var unread by remember { mutableStateOf(false) } …
Run Code Online (Sandbox Code Playgroud) 在具有多个项目类型的惰性列或行中设置插入和删除动画的最佳方法是什么,类似于使用 DiffUtil 的方式?
animation android-diffutils android-jetpack-compose lazycolumn