Fragment.OnDestroyView Method

Definition

Called when the view previously created by #onCreateView has been detached from the fragment.

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

Remarks

Called when the view previously created by #onCreateView has been detached from the fragment. The next time the fragment needs to be displayed, a new view will be created. This is called after #onStop() and before #onDestroy(). It is called <em>regardless</em> of whether #onCreateView returned a non-null view. Internally it is called after the view's state has been saved but before it has been removed from its parent.

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

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