Sdílet prostřednictvím


LocalActivityManager.CurrentActivity Property

Definition

Caution

deprecated

Retrieve the Activity that is currently running.

[System.Obsolete("deprecated")]
public virtual Android.App.Activity? CurrentActivity { [Android.Runtime.Register("getCurrentActivity", "()Landroid/app/Activity;", "GetGetCurrentActivityHandler")] get; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getCurrentActivity", "()Landroid/app/Activity;", "GetGetCurrentActivityHandler")>]
member this.CurrentActivity : Android.App.Activity

Property Value

the currently running (resumed) Activity, or null if there is not one

Attributes

Remarks

Retrieve the Activity that is currently running.

Java documentation for android.app.LocalActivityManager.getCurrentActivity().

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

See also

  • <xref:Android.App.LocalActivityManager.StartActivity(System.String%2c+Android.Content.Intent)>
  • CurrentId