0

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
M. Usman Khan
  • 3,689
  • 1
  • 59
  • 69

1 Answers1

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