J'ai listView implémenté. Quand je défile par programmation, l'animation de défilement est très rapide. Je veux que l'animation de défilement accélère puis décélère avec une vélocité maximum (et/ou durée) fournie par moi.Android-Changez l'animation de défilement en tant que décélération d'accélération
0
A
Répondre
0
Vous pouvez utiliser cette bibliothèque: https://github.com/daimajia/AnimationEasingFunctions
Par exemple:
AnimatorSet animation = new AnimatorSet();
animation.playTogether(Glider.glide(Skill.CubicEaseInOut, 500f, ObjectAnimator.ofInt(listView, "scrollY", itemView.getTop())));
animation.setDuration(500);
animation.start();
où Skill.CubicEaseInOut
est le type d'animation acording http://easings.net/
J'espère que cette aide