Class TransitionOptions<CHILD extends TransitionOptions<CHILD,​TranscodeType>,​TranscodeType>

  • Type Parameters:
    CHILD - The implementation of this class to return to chain methods.
    TranscodeType - The type of resource that will be animated.
    All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    BitmapTransitionOptions, DrawableTransitionOptions, GenericTransitionOptions

    public abstract class TransitionOptions<CHILD extends TransitionOptions<CHILD,​TranscodeType>,​TranscodeType>
    extends java.lang.Object
    implements java.lang.Cloneable
    A base class for setting a transition to use on a resource when a load completes.

    Note: Implementations must implement equals/hashcode.

    • Constructor Detail

      • TransitionOptions

        public TransitionOptions()
    • Method Detail

      • dontTransition

        @NonNull
        public final CHILD dontTransition()
        Removes any existing animation put on the builder. Will be overridden by subsequent calls that put an animation.
        Returns:
        This request builder.
      • transition

        @NonNull
        public final CHILD transition​(int viewAnimationId)
        Sets an Animation to run on the wrapped target when an resource load finishes. Will only be run if the resource was loaded asynchronously (i.e. was not in the memory cache).
        Parameters:
        viewAnimationId - The resource id of the Animation to use as the transition.
        Returns:
        This request builder.
      • transition

        @NonNull
        public final CHILD transition​(@NonNull
                                      ViewPropertyTransition.Animator animator)
        Sets an animator to run a ViewPropertyAnimator on a view that the target may be wrapping when a resource load finishes. Will only be run if the load was loaded asynchronously (i.e. was not in the memory cache).
        Parameters:
        animator - The .Animator to run.
        Returns:
        This request builder.
      • clone

        public final CHILD clone()
        Overrides:
        clone in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object