Language

Activity.IsFinishing Property

Definition

Check to see whether this activity is in the process of finishing, either because you called finish() on it or someone else has requested that it finished.

public virtual bool IsFinishing { [Android.Runtime.Register("isFinishing", "()Z", "GetIsFinishingHandler")] get; }
[<get: Android.Runtime.Register("isFinishing", "()Z", "GetIsFinishingHandler")>]
member this.IsFinishing : bool

Property Value

Attributes

Remarks

Check to see whether this activity is in the process of finishing, either because you called finish() on it or someone else has requested that it finished. This is often used in onPause() to determine whether the activity is simply pausing or completely finishing. However, if the finish request is made after the activity has already been paused/stopped, there won't be another onPause() or onStop() with this API returning true.

For example, if an activity is first minimized, and then gets killed in background, it should first receive onPause() and onStop() with this API returning false, and then receive onDestroy() with this API returning true.

See also:

Android reference for android.app.Activity.isFinishing.

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