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

java.lang.Object
com.bumptech.glide.TransitionOptions<CHILD,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:
Cloneable
Direct Known Subclasses:
BitmapTransitionOptions, DrawableTransitionOptions, GenericTransitionOptions

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

Note: Implementations must implement equals/hashcode.

  • Constructor Details

    • TransitionOptions

      public TransitionOptions()
  • Method Details

    • 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.
    • transition

      @NonNull public final CHILD transition(@NonNull TransitionFactory<? super TranscodeType> transitionFactory)
      Uses the given TransitionFactory to build a Transition for each request started with these TransitionOptions.
      Returns:
      This request builder.
    • clone

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object