Join Slack
Powered by
Is there an easier way to do an alpha animation wh...
# compose
s
spierce7
02/13/2021, 2:30 AM
Is there an easier way to do an alpha animation when state changes with compose without using the whole transition api? It’s very heavy, and when I’m animating a lot of things on a screen for different screens it’s very verbose
z
Zach Klippenstein (he/him) [MOD]
02/13/2021, 2:33 AM
This is the simplest animation api:
https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary#animateFloatAsState(kotli[…]loat,%20kotlin.Function1)
The sample code in the docs is even about animating alpha.
s
spierce7
02/13/2021, 5:05 AM
thanks!
2
Views
Open in Slack
Previous
Next