Methods Summary |
---|
public static android.support.v4.app.ActivityOptionsCompat | makeCustomAnimation(android.content.Context context, int enterResId, int exitResId)Create an ActivityOptions specifying a custom animation to run when the
activity is displayed.
if (Build.VERSION.SDK_INT >= 16) {
return new ActivityOptionsImplJB(
ActivityOptionsCompatJB.makeCustomAnimation(context, enterResId, exitResId));
}
return new ActivityOptionsCompat();
|
public static android.support.v4.app.ActivityOptionsCompat | makeScaleUpAnimation(android.view.View source, int startX, int startY, int startWidth, int startHeight)Create an ActivityOptions specifying an animation where the new activity is
scaled from a small originating area of the screen to its final full
representation.
If the Intent this is being used with has not set its
{@link android.content.Intent#setSourceBounds(android.graphics.Rect)},
those bounds will be filled in for you based on the initial bounds passed
in here.
if (Build.VERSION.SDK_INT >= 16) {
return new ActivityOptionsImplJB(
ActivityOptionsCompatJB.makeScaleUpAnimation(source, startX, startY,
startWidth, startHeight));
}
return new ActivityOptionsCompat();
|
public static android.support.v4.app.ActivityOptionsCompat | makeSceneTransitionAnimation(android.app.Activity activity, android.view.View sharedElement, java.lang.String sharedElementName)Create an ActivityOptions to transition between Activities using cross-Activity scene
animations. This method carries the position of one shared element to the started Activity.
The position of sharedElement will be used as the epicenter for the
exit Transition. The position of the shared element in the launched Activity will be the
epicenter of its entering Transition.
This requires {@link android.view.Window#FEATURE_CONTENT_TRANSITIONS} to be
enabled on the calling Activity to cause an exit transition. The same must be in
the called Activity to get an entering transition.
if (Build.VERSION.SDK_INT >= 21) {
return new ActivityOptionsCompat.ActivityOptionsImpl21(
ActivityOptionsCompat21.makeSceneTransitionAnimation(activity,
sharedElement, sharedElementName));
}
return new ActivityOptionsCompat();
|
public static android.support.v4.app.ActivityOptionsCompat | makeSceneTransitionAnimation(android.app.Activity activity, android.support.v4.util.Pair sharedElements)Create an ActivityOptions to transition between Activities using cross-Activity scene
animations. This method carries the position of multiple shared elements to the started
Activity. The position of the first element in sharedElements
will be used as the epicenter for the exit Transition. The position of the associated
shared element in the launched Activity will be the epicenter of its entering Transition.
This requires {@link android.view.Window#FEATURE_CONTENT_TRANSITIONS} to be
enabled on the calling Activity to cause an exit transition. The same must be in
the called Activity to get an entering transition.
if (Build.VERSION.SDK_INT >= 21) {
View[] views = null;
String[] names = null;
if (sharedElements != null) {
views = new View[sharedElements.length];
names = new String[sharedElements.length];
for (int i = 0; i < sharedElements.length; i++) {
views[i] = sharedElements[i].first;
names[i] = sharedElements[i].second;
}
}
return new ActivityOptionsCompat.ActivityOptionsImpl21(
ActivityOptionsCompat21.makeSceneTransitionAnimation(activity, views, names));
}
return new ActivityOptionsCompat();
|
public static android.support.v4.app.ActivityOptionsCompat | makeThumbnailScaleUpAnimation(android.view.View source, android.graphics.Bitmap thumbnail, int startX, int startY)Create an ActivityOptions specifying an animation where a thumbnail is
scaled from a given position to the new activity window that is being
started.
If the Intent this is being used with has not set its
{@link android.content.Intent#setSourceBounds(android.graphics.Rect)},
those bounds will be filled in for you based on the initial thumbnail
location and size provided here.
if (Build.VERSION.SDK_INT >= 16) {
return new ActivityOptionsImplJB(
ActivityOptionsCompatJB.makeThumbnailScaleUpAnimation(source, thumbnail,
startX, startY));
}
return new ActivityOptionsCompat();
|
public android.os.Bundle | toBundle()Returns the created options as a Bundle, which can be passed to
{@link ActivityCompat#startActivity(android.app.Activity, android.content.Intent, android.os.Bundle)}.
Note that the returned Bundle is still owned by the ActivityOptions
object; you must not modify it, but can supply it to the startActivity
methods that take an options Bundle.
return null;
|
public void | update(android.support.v4.app.ActivityOptionsCompat otherOptions)Update the current values in this ActivityOptions from those supplied in
otherOptions. Any values defined in otherOptions replace those in the
base options.
// Do nothing.
|