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 Object
implements TransitionFactory<R>
A
TransitionFactory for complex types that have a Bitmap inside.
The transitioning bitmap is wrapped in a BitmapDrawable. Most
commonly used with DrawableCrossFadeFactory.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(DataSource dataSource, boolean isFirstResource) Returns a newTransition.protected abstract BitmapRetrieve the Bitmap from a composite object.
-
Constructor Details
-
BitmapContainerTransitionFactory
-
-
Method Details
-
build
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
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
-