Android.Views.ViewGroup.DetachViewFromParent Method
Detaches a view from its parent.

Syntax

[Android.Runtime.Register("detachViewFromParent", "(I)V", "GetDetachViewFromParent_IHandler")]
protected virtual void DetachViewFromParent (int index)

See Also

ViewGroup.DetachViewFromParent(View)
ViewGroup.DetachAllViewsFromParent
ViewGroup.DetachViewsFromParent(int, System.Int32)
ViewGroup.AttachViewToParent(View, System.Int32, System.Int32)
ViewGroup.RemoveDetachedView(View, System.Boolean)

Parameters

index
the index of the child to detach

Remarks

Detaches a view from its parent. Detaching a view should be followed either by a call to ViewGroup.AttachViewToParent(View, System.Int32, System.Int32) or a call to ViewGroup.RemoveDetachedView(View, System.Boolean). Detachment should only be temporary; reattachment or removal should happen within the same drawing cycle as detachment. When a view is detached, its parent is null and cannot be retrieved by a call to ViewGroup.GetChildAt(int).

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1