Språk

Fragment.OnDestroyView Method

Definition

Called when the fragment's view is being released.

[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 fragment's view is being released. The next time the fragment needs a view, OnCreateView(LayoutInflater, ViewGroup, Bundle) is called again. If the fragment was started, this callback follows OnStop(). It precedes OnDestroy() when that callback occurs, and is called even if OnCreateView returned null. If the view state is saved, that occurs before this callback; removal from its parent occurs afterward. If you override this method, call the base implementation.

Android reference 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