T
- The type of the composite object that contains the Bitmap
to be animated.public abstract class BitmapContainerCrossFadeFactory<T> extends Object implements GlideAnimationFactory<T>
GlideAnimation
for complex types that have a Bitmap
inside
that uses an TransitionDrawable
to transition from an existing drawable
already visible on the target to the new bitmap. If no existing drawable exists, this class can
instead fall back to a default animation that doesn't rely on TransitionDrawable
.
The new bitmap queried from the complex type is wrapped in a BitmapDrawable
.Constructor and Description |
---|
BitmapContainerCrossFadeFactory() |
BitmapContainerCrossFadeFactory(Animation defaultAnimation,
int duration) |
BitmapContainerCrossFadeFactory(Context context,
int defaultAnimationId,
int duration) |
BitmapContainerCrossFadeFactory(GlideAnimationFactory<Drawable> realFactory) |
BitmapContainerCrossFadeFactory(int duration) |
Modifier and Type | Method and Description |
---|---|
GlideAnimation<T> |
build(boolean isFromMemoryCache,
boolean isFirstResource)
Returns a new
GlideAnimation . |
protected abstract Bitmap |
getBitmap(T current)
Retrieve the Bitmap from a composite object.
|
public BitmapContainerCrossFadeFactory()
public BitmapContainerCrossFadeFactory(int duration)
public BitmapContainerCrossFadeFactory(Context context, int defaultAnimationId, int duration)
public BitmapContainerCrossFadeFactory(Animation defaultAnimation, int duration)
public BitmapContainerCrossFadeFactory(GlideAnimationFactory<Drawable> realFactory)
public GlideAnimation<T> build(boolean isFromMemoryCache, boolean isFirstResource)
GlideAnimationFactory
GlideAnimation
.build
in interface GlideAnimationFactory<T>
isFromMemoryCache
- True if this will be an animation for a resource that was loaded from the memory cache.isFirstResource
- True if this is the first resource to be loaded into the target.protected abstract Bitmap getBitmap(T current)
current
- composite object containing a Bitmap and some other informationcurrent