Class AdditiveAnimator


  • public final class AdditiveAnimator
    extends SubclassableAdditiveViewAnimator<AdditiveAnimator>
    Use this class to additively animate a lot of properties of Views. If you want to extend the animatable properties, you should extend `SubclassableAdditiveViewAnimator`. Additive animations are nicely explained here: http://ronnqvi.st/multiple-animations/
    • Constructor Detail

      • AdditiveAnimator

        protected AdditiveAnimator​(View view)
      • AdditiveAnimator

        public AdditiveAnimator()
        Creates a new AdditiveAnimator instance without a target view. You **must** call `target(View v)` before calling one of the animation methods.
      • AdditiveAnimator

        public AdditiveAnimator​(long duration)
        Creates a new AdditiveAnimator instance with the specified animation duration for more convenience. You **must** call `target(View v)` before calling one of the animation methods.
    • Method Detail

      • animate

        public static AdditiveAnimator animate​(View view)
        This is just a convenience method when you need to animate a single view. No state is kept in individual AdditiveAnimator instances, so you don't need to keep a reference to it.
        Parameters:
        view - The view to animate.
        Returns:
        A new instance of AdditiveAnimator with `target` set to `view`.
      • animate

        public static AdditiveAnimator animate​(View view,
                                               long duration)
        This is just a convenience method when you need to animate a single view. No state is kept in individual AdditiveAnimator instances, so you don't need to keep a reference to it.
        Parameters:
        view - The view to animate.
        duration - The animation duration.
        Returns:
        A new instance of AdditiveAnimator with the animation target set to `view` and the animationDuration set to `duration`.