Vsevolod Ganin02/24/2021, 6:35 PM
which produces function
from the list of
. Do I need to recreate it manually now or is there an analogue?
matvei02/24/2021, 6:59 PM
If you were using FlingConfig with scroll-based APIs, there's a better, suspending version called
If you are using FlingConfig to precalculate your own anchors in a custom way and don't need a swipeable and the package that comes with it: you can just make it happen with the APIs that exist in beta 🙂 You need to calculate the approximate target yourself using AnimationSpec of your choice, and then adjust it to the anchor to get the real target value to animate to. Them, choose the API from the animation stack to use (Animatable, AnimationState, transition even?) and animate! 🙂 It gives even more control to you much overhead compared to the FlingConfig. Hit me up with any question that you have!
Vsevolod Ganin02/24/2021, 7:32 PM
for good at last 😁 I have a couple of questions if you don’t mind. • What is the default decay spec for true androidish fling feel? There was some factory function like
though I may be wrong.
I believe. So it’s just that? • I’m getting a bit lost between decay specs. Earlier in alpha12 I discovered that there is some generalization over
. And there is
. Is there a plan to get rid of
in the future? •
sounds really interesting. Unfortunately it seems I am not able to find the corresponding APIs... Could you please direct me to any doc page mentioning it?
Albert Chang02/25/2021, 8:56 AM
Vsevolod Ganin02/25/2021, 9:46 AM
matvei02/25/2021, 1:01 PM
is the decay spec for a generic vectorized value. Vectorized value can have more than one value changing at a time (imagine Color which is a 4d vector since you are animating r,g,b and alpha). FloatDecayAnimationSpec is a particular 1dimentional float based spec, which is used commonly since we usually decay float pixels in the scroll/viewpager/etc. Can be quite confusing on the first glance, but in general it's a powerful toolset for anything you might want to animate 🙂