added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

ActivityOptionsCompat

public class ActivityOptionsCompat
extends Object

java.lang.Object
   ↳ android.support.v4.app.ActivityOptionsCompat


Helper for accessing features in ActivityOptions in a backwards compatible fashion.

Summary

Constants

String EXTRA_USAGE_TIME_REPORT

A long in the extras delivered by requestUsageTimeReport(PendingIntent) that contains the total time (in ms) the user spent in the app flow.

String EXTRA_USAGE_TIME_REPORT_PACKAGES

A Bundle in the extras delivered by requestUsageTimeReport(PendingIntent) that contains detailed information about the time spent in each package associated with the app; each key is a package name, whose value is a long containing the time (in ms).

Protected constructors

ActivityOptionsCompat()

Public methods

Rect getLaunchBounds()

Returns the bounds that should be used to launch the activity.

static ActivityOptionsCompat makeBasic()

Create a basic ActivityOptions that has no special animation associated with it.

static ActivityOptionsCompat makeClipRevealAnimation(View source, int startX, int startY, int width, int height)

Create an ActivityOptions specifying an animation where the new activity is revealed from a small originating area of the screen to its final full representation.

static ActivityOptionsCompat makeCustomAnimation(Context context, int enterResId, int exitResId)

Create an ActivityOptions specifying a custom animation to run when the activity is displayed.

static ActivityOptionsCompat makeScaleUpAnimation(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.

static ActivityOptionsCompat makeSceneTransitionAnimation(Activity activity, Pair...<View, String> sharedElements)

Create an ActivityOptions to transition between Activities using cross-Activity scene animations.

static ActivityOptionsCompat makeSceneTransitionAnimation(Activity activity, View sharedElement, String sharedElementName)

Create an ActivityOptions to transition between Activities using cross-Activity scene animations.

static ActivityOptionsCompat makeTaskLaunchBehind()

If set along with Intent.FLAG_ACTIVITY_NEW_DOCUMENT then the task being launched will not be presented to the user but will instead be only available through the recents task list.

static ActivityOptionsCompat makeThumbnailScaleUpAnimation(View source, 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.

void requestUsageTimeReport(PendingIntent receiver)

Ask the the system track that time the user spends in the app being launched, and report it back once done.

ActivityOptionsCompat