相关疑难解决方法(0)

带动画的 LazyColumn 内的 SwipeToDismiss

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)

android kotlin android-jetpack-compose

4
推荐指数
1
解决办法
5371
查看次数

Jetpack Compose 具有多种项目类型的惰性列插入和删除动画

在具有多个项目类型的惰性列或行中设置插入和删除动画的最佳方法是什么,类似于使用 DiffUtil 的方式?

animation android-diffutils android-jetpack-compose lazycolumn

3
推荐指数
1
解决办法
7621
查看次数