R - The type of the composite object that contains the Bitmap to
be transitioned.public abstract class BitmapContainerTransitionFactory<R> extends Object implements TransitionFactory<R>
TransitionFactory for complex types that have a Bitmap inside.
The transitioning bitmap is wrapped in a BitmapDrawable.
Most commonly used with DrawableCrossFadeFactory.| Constructor and Description |
|---|
BitmapContainerTransitionFactory(TransitionFactory<Drawable> realFactory) |
| Modifier and Type | Method and Description |
|---|---|
Transition<R> |
build(DataSource dataSource,
boolean isFirstResource)
Returns a new
Transition. |
protected abstract Bitmap |
getBitmap(R current)
Retrieve the Bitmap from a composite object.
|
public BitmapContainerTransitionFactory(TransitionFactory<Drawable> realFactory)
public Transition<R> build(DataSource dataSource, boolean isFirstResource)
TransitionFactoryTransition.build in interface TransitionFactory<R>dataSource - The DataSource the resource was loaded
from.isFirstResource - True if this is the first resource to be loaded into the target.protected abstract Bitmap getBitmap(R current)
Warning: Do not convert any arbitrary object to Bitmap via expensive drawing here, this method is called on the UI thread.
current - composite object containing a Bitmap and some other informationcurrent