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

jaqxues

01/14/2021, 2:02 PM
animate
has been deprecated and should now be
animateAsState
however, there are 2 different top level functions for
T
, and one for
Color
androidx.compose.animation.animateAsState
(Color)
androidx.compose.animation.core.animateAsState
(T) Is that intended?
j

jim

01/14/2021, 5:57 PM
cc @Doris Liu
d

Doris Liu

01/14/2021, 7:11 PM
Yes, that's intended, because of library dependencies:
animation-core
doesn't depend on ui-graphics, so all Color-specific animation APIs are in
animation
lib. Are you having trouble importing the color variant?
j

jaqxues

01/14/2021, 7:12 PM
Well it creates issues since both have the same names, and wanting to use both functions in the same file. I just used import aliases now, but I think there might be a better way?
d

Doris Liu

01/14/2021, 7:15 PM
There's a bug tracking that at https://b.corp.google.com/issues/177072147. If you could add your use case in a snippet that would be helpful for studio to verify the fix. 🙂
3 Views