Class BitmapContainerTransitionFactory<R>
- java.lang.Object
-
- com.bumptech.glide.request.transition.BitmapContainerTransitionFactory<R>
-
- Type Parameters:
R- The type of the composite object that contains theBitmapto be transitioned.
- All Implemented Interfaces:
TransitionFactory<R>
- Direct Known Subclasses:
BitmapTransitionFactory
public abstract class BitmapContainerTransitionFactory<R> extends java.lang.Object implements TransitionFactory<R>
ATransitionFactoryfor complex types that have aBitmapinside. The transitioning bitmap is wrapped in aBitmapDrawable. Most commonly used withDrawableCrossFadeFactory.
-
-
Constructor Summary
Constructors Constructor Description BitmapContainerTransitionFactory(TransitionFactory<android.graphics.drawable.Drawable> realFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Transition<R>build(DataSource dataSource, boolean isFirstResource)Returns a newTransition.protected abstract android.graphics.BitmapgetBitmap(R current)Retrieve the Bitmap from a composite object.
-
-
-
Constructor Detail
-
BitmapContainerTransitionFactory
public BitmapContainerTransitionFactory(TransitionFactory<android.graphics.drawable.Drawable> realFactory)
-
-
Method Detail
-
build
public Transition<R> build(DataSource dataSource, boolean isFirstResource)
Description copied from interface:TransitionFactoryReturns a newTransition.- Specified by:
buildin interfaceTransitionFactory<R>- Parameters:
dataSource- TheDataSourcethe resource was loaded from.isFirstResource- True if this is the first resource to be loaded into the target.
-
getBitmap
protected abstract android.graphics.Bitmap getBitmap(R current)
Retrieve the Bitmap from a composite object.Warning: Do not convert any arbitrary object to Bitmap via expensive drawing here, this method is called on the UI thread.
- Parameters:
current- composite object containing a Bitmap and some other information- Returns:
- the Bitmap contained within
current
-
-