I have listView implemented. When I scroll programmatically, it scrolling animation is very fast. I want the scroll animation to accelerate and then decelerate with a Maximum velocity (and/or duration) provided by me.
Asked
Active
Viewed 467 times
1 Answers
0
You can use this library: https://github.com/daimajia/AnimationEasingFunctions
For example:
AnimatorSet animation = new AnimatorSet();
animation.playTogether(Glider.glide(Skill.CubicEaseInOut, 500f, ObjectAnimator.ofInt(listView, "scrollY", itemView.getTop())));
animation.setDuration(500);
animation.start();
where Skill.CubicEaseInOut
is type of animation acording http://easings.net/
I hope this helps

Pepcox
- 11
- 3