public class RenderThreadTransition extends TransitionAnimationBinding
PropertyAnimation
to be run on the render
thread, while at the same time shadow the animation on the UI thread in order to keep AnimatedPropertyNode
value in sync. If the delay is passed it will be considered as a part of
the animation, and will be applied by creating an adjusted interpolator (you may consider using
Transition.delay(int, Transition)
()} instead, but this way the delay will be handled on
the UI thread)Constructor and Description |
---|
RenderThreadTransition(PropertyAnimation propertyAnimation,
int delayMs,
int durationMs,
TimeInterpolator interpolator) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(AnimationBindingListener animationBindingListener)
Adds a
AnimationBindingListener . |
void |
collectTransitioningProperties(ArrayList<PropertyAnimation> outList)
Collects the set of
PropertyAnimation s that this animation will animate. |
void |
removeListener(AnimationBindingListener animationBindingListener)
Removes a previously added
AnimationBindingListener . |
protected void |
setupBinding(Resolver resolver)
Subclasses should set up their animation by creating a graph that defines how data will flow
to relevant
AnimatedPropertyNode s. |
void |
start(Resolver resolver)
Starts this animation.
|
void |
stop()
Stops this animation.
|
addBinding, addBinding, isActive, prepareToStartLater
public RenderThreadTransition(PropertyAnimation propertyAnimation, int delayMs, int durationMs, TimeInterpolator interpolator)
public void collectTransitioningProperties(ArrayList<PropertyAnimation> outList)
AnimationBinding
PropertyAnimation
s that this animation will animate. This is used
to make sure before/after values are recorded and accessible for the animation. Implementations
should add their animating properties to this set.
Note: This is a 'collect' call instead of a getter to allocating more sets then necessary for
animations with nested animation (e.g. a sequence of animations). Yay Java.protected void setupBinding(Resolver resolver)
TransitionAnimationBinding
AnimatedPropertyNode
s.setupBinding
in class TransitionAnimationBinding
public void start(Resolver resolver)
AnimationBinding
Resolver
instance can be used to configure this
animation appropriately using mount content property current and end values.start
in interface AnimationBinding
start
in class TransitionAnimationBinding
public void stop()
AnimationBinding
stop
in interface AnimationBinding
stop
in class TransitionAnimationBinding
public final void addListener(AnimationBindingListener animationBindingListener)
AnimationBinding
AnimationBindingListener
.addListener
in interface AnimationBinding
public final void removeListener(AnimationBindingListener animationBindingListener)
AnimationBinding
AnimationBindingListener
.removeListener
in interface AnimationBinding