public static class Transition.SpringTransitionAnimator extends Object implements Transition.TransitionAnimator
Constructor and Description |
---|
SpringTransitionAnimator()
Create spring-driven animator with default values of
SpringConfig.DEFAULT_FRICTION
and SpringConfig.DEFAULT_TENSION . |
SpringTransitionAnimator(double tension,
double friction)
Create spring-driven animator with given tension and friction values.
|
Modifier and Type | Method and Description |
---|---|
TransitionAnimationBinding |
createAnimation(PropertyAnimation propertyAnimation) |
public SpringTransitionAnimator()
SpringConfig.DEFAULT_FRICTION
and SpringConfig.DEFAULT_TENSION
. Spring physics implementation is taken from Rebound
library and we recommend to use demo provided at http://facebook.github.io/rebound to have a
better sense of how friction and tension values work together.public SpringTransitionAnimator(double tension, double friction)
public TransitionAnimationBinding createAnimation(PropertyAnimation propertyAnimation)
createAnimation
in interface Transition.TransitionAnimator
TransitionAnimationBinding
for the given PropertyAnimation
that
will animate the change in value on this property.