public class TransitionUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TransitionUtils.MatrixEvaluator |
Constructor and Description |
---|
TransitionUtils() |
Modifier and Type | Method and Description |
---|---|
static View |
copyViewImage(ViewGroup sceneRoot,
View view,
View parent)
Creates a View using the bitmap copy of
view . |
static Bitmap |
createDrawableBitmap(Drawable drawable)
Get a copy of bitmap of given drawable, return null if intrinsic size is zero
|
static Bitmap |
createViewBitmap(View view,
Matrix matrix,
RectF bounds)
Creates a Bitmap of the given view, using the Matrix matrix to transform to the local
coordinates.
|
static Transition |
mergeTransitions(Transition... transitions) |
public static Transition mergeTransitions(Transition... transitions)
public static View copyViewImage(ViewGroup sceneRoot, View view, View parent)
view
. If view
is large,
the copy will use a scaled bitmap of the given view.sceneRoot
- The ViewGroup in which the view copy will be displayed.view
- The view to create a copy of.parent
- The parent of view.public static Bitmap createDrawableBitmap(Drawable drawable)
public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds)
matrix
will be modified during the bitmap creation.
If the bitmap is large, it will be scaled uniformly down to at most 1MB size.
view
- The view to create a bitmap for.matrix
- The matrix converting the view local coordinates to the coordinates that
the bitmap will be displayed in. matrix
will be modified before
returning.bounds
- The bounds of the bitmap in the destination coordinate system (where the
view should be presented. Typically, this is matrix.mapRect(viewBounds);