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

ursus

11/14/2019, 3:37 AM
Has someone talked about how animations will work? Is it going to be TransitionManager automatic type of stuff?
l

Luca Nicoletti

11/14/2019, 8:51 AM
You can have a look at some example bundle with
repo
Ripple
is a good example for animations imho
m

matvei

11/14/2019, 10:49 AM
You also might want to take a look at
Transition
composable and
transitionDefinition
function, if you want to have declarative animation between states
If you want flexible control over animation of one value, consider using
AnimatedFloat
or
AnimatedValue
, so you can have animatable value holder experience
z

Zach Klippenstein (he/him) [MOD]

11/14/2019, 4:47 PM
I believe they are also planning to add something like SwiftUI’s
withAnimation
in the future. https://developer.apple.com/tutorials/swiftui/animating-views-and-transitions
u

ursus

11/14/2019, 6:50 PM
@Zach Klippenstein (he/him) [MOD] interesting, but how would I know which animation to play, or rather from which state to animate from? Would I need to keep a reference to a previous state? (since ui now has no state)
z

Zach Klippenstein (he/him) [MOD]

11/14/2019, 6:54 PM
No idea. I assume it would be similar to how SwiftUI does it but you'd have to ask someone who's actually working on it 😂