Language

ActivityOptions.MakeSceneTransitionAnimation Method

Definition

Overloads

Name Description
MakeSceneTransitionAnimation(Activity, Pair[])

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

MakeSceneTransitionAnimation(Activity, View, String)

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

MakeSceneTransitionAnimation(Activity, Pair[])

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

[Android.Runtime.Register("makeSceneTransitionAnimation", "(Landroid/app/Activity;[Landroid/util/Pair;)Landroid/app/ActivityOptions;", "")]
public static Android.App.ActivityOptions? MakeSceneTransitionAnimation(Android.App.Activity? activity, params Android.Util.Pair[]? sharedElements);
[<Android.Runtime.Register("makeSceneTransitionAnimation", "(Landroid/app/Activity;[Landroid/util/Pair;)Landroid/app/ActivityOptions;", "")>]
static member MakeSceneTransitionAnimation : Android.App.Activity * Android.Util.Pair[] -> Android.App.ActivityOptions

Parameters

activity
Activity

Activity: The Activity whose window contains the shared elements.

sharedElements
Pair[]

Pair: The names of the shared elements to transfer to the called Activity and their associated Views. The Views must each have a unique shared element name.

Returns

Attributes

Remarks

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 Window.FEATURE_ACTIVITY_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.

See also:

Android reference for android.app.ActivityOptions.makeSceneTransitionAnimation.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

MakeSceneTransitionAnimation(Activity, View, String)

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

[Android.Runtime.Register("makeSceneTransitionAnimation", "(Landroid/app/Activity;Landroid/view/View;Ljava/lang/String;)Landroid/app/ActivityOptions;", "")]
public static Android.App.ActivityOptions? MakeSceneTransitionAnimation(Android.App.Activity? activity, Android.Views.View? sharedElement, string? sharedElementName);
[<Android.Runtime.Register("makeSceneTransitionAnimation", "(Landroid/app/Activity;Landroid/view/View;Ljava/lang/String;)Landroid/app/ActivityOptions;", "")>]
static member MakeSceneTransitionAnimation : Android.App.Activity * Android.Views.View * string -> Android.App.ActivityOptions

Parameters

activity
Activity

The Activity whose window contains the shared elements.

sharedElement
View

The View to transition to the started Activity.

sharedElementName
String

The shared element name as used in the target Activity. This must not be null.

Returns

Returns a new ActivityOptions object that you can use to supply these options as the options Bundle when starting an activity.

Attributes

Remarks

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 Window.FEATURE_ACTIVITY_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.

See also:

Android reference for android.app.ActivityOptions.makeSceneTransitionAnimation.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to