Kazemihabib199604/29/2020, 4:48 PM
it accepts a
fun AnimatedFloat.fling( startVelocity: Float, decay: DecayAnimation = ExponentialDecay(), adjustTarget: (Float) -> TargetAnimation?, onEnd: OnAnimationEnd? = null )
so far it makes sence. but it also accepts an
that's the what I can't understand, setting new target with new animation inside fling animation?
matvei04/29/2020, 4:55 PM
. For example, imagine you have some bounds and want to nicely fling to the bound, not at the random point where decay stopped it. That's when you can adjust target so fling will end where you need it to
Kazemihabib199604/29/2020, 5:23 PM
is not null.
matvei04/29/2020, 5:24 PM
will just work fine 🙂