https://kotlinlang.org logo
#compose
Title
# compose
l

loloof64

02/05/2021, 1:29 PM
Is a
androidx.compose.animation.core.Transition
cheap or expensive to create ? I mean, is it safe to create an array of
Transition
? I mean a 64 cells array
d

Doris Liu

02/05/2021, 7:56 PM
I don't think creating
Transition
on its own is expensive, especially if there aren't a lot of animations that it coordinates. Under the hood
Transition
would create a few internal states, which is pretty much needed for any animation (single value animation or Transition). Nothing super expensive. Curious whether you tried creating 64 of them? 😄
l

loloof64

02/07/2021, 6:00 PM
Thank you. Indeed I've not tried yet. But it can be a good idea : in fact I want to hold a Transition per piece in a chess board 🙂
3 Views