ursus
02/05/2023, 10:44 PMModifier.animateItemPlacement
equivalent for a plain Column
(not lazy?)
i.e. to animate item insertion/deletion in the list? (animateContentSize
won't do)
val players by remember { AppComponent.dao.players() }.collectAsState(emptyList())
Column {
for (player in players) {
Text(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()
.padding(16.dp),
text = "player=$player"
)
Divider()
}
}
I know this could be made a LazyColumn
but for research purpose let assume nottad
02/05/2023, 11:30 PMAnimatedContent
with an empty transition, and Modifier.animateEnterExit
to simulate the same animation behavior.ursus
02/05/2023, 11:51 PMtad
02/05/2023, 11:53 PMEnterTransition.None with ExitTransition.None using null
for the transitionSpec, and use that modifier on each child you want animatedursus
02/05/2023, 11:56 PMtad
02/06/2023, 12:00 AManimateEnterExit
on the deleted child. The animated state would be a list of children (or IDs) to show in the column.