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

Ahmet Delibaş

02/25/2021, 10:11 AM
Hello guys. I was using AmbientAnimationClock, but with beta release I realize this object is removed. What can I use for this ?
👀 1
a

Adam Powell

02/25/2021, 2:46 PM
The replacement is the suspending animation functions built on
withFrameNanos
Animation timing is now driven by the
MonotonicFrameClock
CoroutineContext
element, which
withFrameNanos
consults. It behaves similarly to the
delay
function, but aligns to the animation frame and gives you the timestamp of the frame. The various
animate
suspend functions are built on it.
You can call these functions in
LaunchedEffect,
coroutines launched from scopes obtained from
rememberCoroutineScope
, and other scopes from the composition.
1
👍 1
a

Ahmet Delibaş

02/25/2021, 2:58 PM
Thank you so so much Adam, I'll look at these.
👍 1
2 Views