public static class Transition.SpringTransitionAnimator extends java.lang.Object implements Transition.TransitionAnimator
Constructor and Description |
---|
SpringTransitionAnimator(double tension,
double friction)
Create spring-driven animator with given tension and friction values.
|
SpringTransitionAnimator(SpringConfig springConfig)
Create spring-driven animator with given
SpringConfig . |
Modifier and Type | Method and Description |
---|---|
TransitionAnimationBinding |
createAnimation(PropertyAnimation propertyAnimation) |
public SpringTransitionAnimator(double tension, double friction)
public SpringTransitionAnimator(SpringConfig springConfig)
SpringConfig
. Spring physics implementation
is taken from Rebound library and we recommend to use demo provided at https://facebookarchive.github.io/rebound to have a
better sense of how friction and tension values work together.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.