共用方式為


Fragment.OnDetach Method

Definition

Called when the fragment is no longer attached to its activity.

[Android.Runtime.Register("onDetach", "()V", "GetOnDetachHandler")]
public virtual void OnDetach ();
[<Android.Runtime.Register("onDetach", "()V", "GetOnDetachHandler")>]
abstract member OnDetach : unit -> unit
override this.OnDetach : unit -> unit
Attributes

Remarks

Called when the fragment is no longer attached to its activity. This is called after #onDestroy(), except in the cases where the fragment instance is retained across Activity re-creation (see #setRetainInstance(boolean)), in which case it is called after #onStop().

Java documentation for android.app.Fragment.onDetach().

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