ReorderingItem
fun LazyItemScope.ReorderingItem(state: ReorderingState, key: Any, modifier: Modifier = Modifier, enabled: Boolean = true, content: @Composable ReorderingItemScope.(isDragging: Boolean) -> Unit)
包裹一个 Lazy item,key 必须与 items 的 key 相同。普通项使用容器的 animateItem 动画, 拖动项浮到最上层并跟随指针,松手后以弹簧动画回落。enabled 为 false 时不能作为移动目标, 但插入操作仍可能改变它的索引;不包裹的 header/footer 同样不能作为目标。 默认由框架绘制拖动态的状态层和阴影;可通过 LocalReorderingItemStyle 覆盖样式。
fun LazyGridItemScope.ReorderingItem(state: ReorderingState, key: Any, modifier: Modifier = Modifier, enabled: Boolean = true, content: @Composable ReorderingItemScope.(isDragging: Boolean) -> Unit)
用于 LazyVerticalGrid / LazyHorizontalGrid,约定与 ReorderingState 相同。
fun LazyStaggeredGridItemScope.ReorderingItem(state: ReorderingState, key: Any, modifier: Modifier = Modifier, enabled: Boolean = true, content: @Composable ReorderingItemScope.(isDragging: Boolean) -> Unit)
用于 LazyVerticalStaggeredGrid / LazyHorizontalStaggeredGrid。