Activity.OverridePendingTransition Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| OverridePendingTransition(Int32, Int32, Int32) |
This method was deprecated in API level 34. |
| OverridePendingTransition(Int32, Int32) |
This method was deprecated in API level 34. |
OverridePendingTransition(Int32, Int32, Int32)
This method was deprecated in API level 34.
[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
int: A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation.
- exitAnim
- Int32
int: A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation.
- backgroundColor
- Int32
int: 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
This method was deprecated in API level 34. Use overrideActivityTransition(int, int, int, int)} instead.
Call immediately after one of the flavors of startActivity(Intent) or finish() to specify an explicit transition animation to perform next. As of 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.
Android reference for android.app.Activity.overridePendingTransition.
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)
This method was deprecated in API level 34.
[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
int: A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation.
- exitAnim
- Int32
int: A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation.
- Attributes
Remarks
This method was deprecated in API level 34. Use overrideActivityTransition(int, int, int)} instead.
Call immediately after one of the flavors of startActivity(Intent) or finish() to specify an explicit transition animation to perform next. As of 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 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.
Android reference for android.app.Activity.overridePendingTransition.
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.