Class AdditiveObjectAnimator<V>
- java.lang.Object
-
- at.wirecube.additiveanimations.additive_animator.sequence.AnimationSequence
-
- at.wirecube.additiveanimations.additive_animator.BaseAdditiveAnimator<AdditiveObjectAnimator<V>,V>
-
- at.wirecube.additiveanimations.additive_animator.AdditiveObjectAnimator<V>
-
public class AdditiveObjectAnimator<V> extends BaseAdditiveAnimator<AdditiveObjectAnimator<V>,V>
This is a small utility class which can animate any kind of object using theBaseAdditiveAnimator.property(float, FloatProperty)andBaseAdditiveAnimator.property(float, TypeEvaluator, FloatProperty)methods. If you'd like to provide your own builder methods for creating animations, subclassBaseAdditiveAnimator.
-
-
Field Summary
-
Fields inherited from class at.wirecube.additiveanimations.additive_animator.BaseAdditiveAnimator
mAnimationAccumulator, mAnimatorGroup, mCurrentCustomInterpolator, mCurrentTarget, mParent, mRunningAnimationsManager, sequenceDelay, staggerDelay
-
-
Constructor Summary
Constructors Constructor Description AdditiveObjectAnimator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V> AdditiveObjectAnimator<V>animate(V target)static <V> AdditiveObjectAnimator<V>animate(V target, long duration)static <V> AdditiveObjectAnimator<V>create()static <V> AdditiveObjectAnimator<V>create(long duration)FloatgetCurrentPropertyValue(String propertyName)Returns the actual value of the animation target with the given name.protected AdditiveObjectAnimator<V>newInstance()Factory method for creation of subclass instances.voidonApplyChanges()This method will be called when the current frame has been calculated.AdditiveObjectAnimator<V>setAnimationApplier(Runnable animationApplier)protected AdditiveObjectAnimator<V>setParent(AdditiveObjectAnimator<V> other)Copies all relevant attributes, including (ONLY) current target from `other` to self.-
Methods inherited from class at.wirecube.additiveanimations.additive_animator.BaseAdditiveAnimator
action, addEndAction, addListener, addPauseListener, addStartAction, addTarget, addUpdateListener, animate, animate, animate, animate, animate, animatePropertiesAlongPath, animateProperty, animateProperty, animatePropertyBy, apply, apply, applyCustomProperties, cancelAnimation, cancelAnimation, cancelAnimation, cancelAnimationsForObject, cancelAnimationsForObjects, cancelAnimationsInCollection, createAnimation, createAnimation, createAnimation, createChildWithDelayAfterParentStart, createChildWithRawDelay, getCurrentTarget, getQueuedPropertyValue, getRunningAnimationsManager, getTargetPropertyValue, getTargetPropertyValue, getTotalDurationInSequence, getValueAnimator, initValueAnimatorIfNeeded, property, property, property, runIfParentIsInSameAnimationGroup, self, setDefaultDuration, setDefaultInterpolator, setDelayInSequence, setDuration, setInterpolator, setRepeatCount, setRepeatMode, setsDefaultInterpolator, setStartDelay, start, state, switchDuration, switchInterpolator, switchToDefaultInterpolator, target, targets, targets, targets, then, thenBeforeEnd, thenDelayAfterEnd, thenWithDelay
-
Methods inherited from class at.wirecube.additiveanimations.additive_animator.sequence.AnimationSequence
playSequentially, playSequentially, playTogether, playTogether, playWithDelayBetweenAnimations
-
-
-
-
Method Detail
-
newInstance
protected AdditiveObjectAnimator<V> newInstance()
Description copied from class:BaseAdditiveAnimatorFactory method for creation of subclass instances. Override to use all of the advanced features with your custom subclass.- Specified by:
newInstancein classBaseAdditiveAnimator<AdditiveObjectAnimator<V>,V>
-
animate
public static <V> AdditiveObjectAnimator<V> animate(V target)
-
animate
public static <V> AdditiveObjectAnimator<V> animate(V target, long duration)
-
create
public static <V> AdditiveObjectAnimator<V> create()
-
create
public static <V> AdditiveObjectAnimator<V> create(long duration)
-
setParent
protected AdditiveObjectAnimator<V> setParent(AdditiveObjectAnimator<V> other)
Description copied from class:BaseAdditiveAnimatorCopies all relevant attributes, including (ONLY) current target from `other` to self. Override if you have custom properties that need to be copied.- Overrides:
setParentin classBaseAdditiveAnimator<AdditiveObjectAnimator<V>,V>
-
setAnimationApplier
public AdditiveObjectAnimator<V> setAnimationApplier(Runnable animationApplier)
-
getCurrentPropertyValue
public Float getCurrentPropertyValue(String propertyName)
Description copied from class:BaseAdditiveAnimatorReturns the actual value of the animation target with the given name.- Specified by:
getCurrentPropertyValuein classBaseAdditiveAnimator<AdditiveObjectAnimator<V>,V>
-
onApplyChanges
public void onApplyChanges()
Description copied from class:BaseAdditiveAnimatorThis method will be called when the current frame has been calculated. Override this method in a subclass to trigger a layout of your view/canvas/custom object.- Specified by:
onApplyChangesin classBaseAdditiveAnimator<AdditiveObjectAnimator<V>,V>
-
-