ActivityOptionsCompat

public class ActivityOptionsCompat
extends Object

java.lang.Object
   ↳ androidx.core.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, View sharedElement, String sharedElementName)

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

static ActivityOptionsCompat makeSceneTransitionAnimation(Activity activity, Pair...<