0

Is there any way to this day to animate the visbility of an item from LazyColumn/LazyRow? I can't seem to find an option for this, I tried to do a extra parameter of boolean type for my data class object and then use it there like:

AnimatedVisbility(visible = item.visibility){}

But sadly that's not working even if duration for fadeIn() is 8000L

I've read that this is on the way but might be wrong, anyways is there a way to animate an item list?

Barrufet
  • 495
  • 1
  • 11
  • 33

1 Answers1

1

Workarounds:-

1.) Add modifier.animateContentSize to your items, then animate the height and width of those items to zero.dp

2.) Pass in a list item (a variable) to the items block of LazyColumn and then modify this list variable to trigger a recompostion. I guess Compose will ensure that only the necessary bits get recomposed.

Richard Onslow Roper
  • 5,477
  • 2
  • 11
  • 42