Share via


Activity.OverridePendingTransition Method

Definition

Overloads

OverridePendingTransition(Int32, Int32)

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

OverridePendingTransition(Int32, Int32, Int32)

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

OverridePendingTransition(Int32, Int32)

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

[Android.Runtime.Register("overridePendingTransition", "(II)V", "GetOverridePendingTransition_IIHandler")]
public virtual void OverridePendingTransition (int enterAnim, int exitAnim);
[<Android.Runtime.Register("overridePendingTransition", "(II)V", "GetOverridePendingTransition_IIHandler")>]
abstract member OverridePendingTransition : int * int -> unit
override this.OverridePendingTransition : int * int -> unit

Parameters

enterAnim
Int32

A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation.

exitAnim
Int32

A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation.

Attributes

Remarks

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

As of android.os.Build.VERSION_CODES#JELLY_BEAN an alternative to using this with starting activities is to supply the desired animation information through a ActivityOptions bundle to #startActivity(Intent, Bundle) or a related function. This allows you to specify a custom animation even when starting an activity from outside the context of the current top activity.

Af of android.os.Build.VERSION_CODES#S application can only specify a transition animation when the transition happens within the same task. System default animation is used for cross-task transition animations.

This member is deprecated. Use #overrideActivityTransition(int, int, int)} instead.

Java documentation for android.app.Activity.overridePendingTransition(int, int).

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

OverridePendingTransition(Int32, Int32, Int32)

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

[Android.Runtime.Register("overridePendingTransition", "(III)V", "GetOverridePendingTransition_IIIHandler", ApiSince=33)]
public virtual void OverridePendingTransition (int enterAnim, int exitAnim, int backgroundColor);
[<Android.Runtime.Register("overridePendingTransition", "(III)V", "GetOverridePendingTransition_IIIHandler", ApiSince=33)>]
abstract member OverridePendingTransition : int * int * int -> unit
override this.OverridePendingTransition : int * int * int -> unit

Parameters

enterAnim
Int32

A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation.

exitAnim
Int32

A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation.

backgroundColor
Int32

The background color to use for the background during the animation if the animation requires a background. Set to 0 to not override the default color.

Attributes

Remarks

Call immediately after one of the flavors of #startActivity(Intent) or #finish to specify an explicit transition animation to perform next.

As of android.os.Build.VERSION_CODES#JELLY_BEAN an alternative to using this with starting activities is to supply the desired animation information through a ActivityOptions bundle to #startActivity(Intent, Bundle) or a related function. This allows you to specify a custom animation even when starting an activity from outside the context of the current top activity.

This member is deprecated. Use #overrideActivityTransition(int, int, int, int)} instead.

Java documentation for android.app.Activity.overridePendingTransition(int, int, int).

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