Package com.bumptech.glide
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:
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.CloneableA base class for setting a transition to use on a resource when a load completes.Note: Implementations must implement equals/hashcode.
-
-
Constructor Summary
Constructors Constructor Description TransitionOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CHILDclone()CHILDdontTransition()Removes any existing animation put on the builder.booleanequals(java.lang.Object o)inthashCode()CHILDtransition(int viewAnimationId)Sets anAnimationto run on the wrapped target when an resource load finishes.CHILDtransition(TransitionFactory<? super TranscodeType> transitionFactory)Uses the givenTransitionFactoryto build aTransitionfor each request started with theseTransitionOptions.CHILDtransition(ViewPropertyTransition.Animator animator)Sets an animator to run aViewPropertyAnimatoron a view that the target may be wrapping when a resource load finishes.
-
-
-
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 anAnimationto 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 theAnimationto use as the transition.- Returns:
- This request builder.
-
transition
@NonNull public final CHILD transition(@NonNull ViewPropertyTransition.Animator animator)
Sets an animator to run aViewPropertyAnimatoron 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.Animatorto run.- Returns:
- This request builder.
-
transition
@NonNull public final CHILD transition(@NonNull TransitionFactory<? super TranscodeType> transitionFactory)
Uses the givenTransitionFactoryto build aTransitionfor each request started with theseTransitionOptions.- Returns:
- This request builder.
-
clone
public final CHILD clone()
- Overrides:
clonein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-