Udostępnij za pośrednictwem


ViewGroup.DetachViewsFromParent(Int32, Int32) Method

Definition

Detaches a range of views from their parents.

[Android.Runtime.Register("detachViewsFromParent", "(II)V", "GetDetachViewsFromParent_IIHandler")]
protected virtual void DetachViewsFromParent (int start, int count);
[<Android.Runtime.Register("detachViewsFromParent", "(II)V", "GetDetachViewsFromParent_IIHandler")>]
abstract member DetachViewsFromParent : int * int -> unit
override this.DetachViewsFromParent : int * int -> unit

Parameters

start
Int32

the first index of the childrend range to detach

count
Int32

the number of children to detach

Attributes

Remarks

Detaches a range of views from their parents. Detaching a view should be followed either by a call to #attachViewToParent(View, int, android.view.ViewGroup.LayoutParams) or a call to #removeDetachedView(View, 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 #getChildAt(int).

Java documentation for android.view.ViewGroup.detachViewsFromParent(int, int).

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

See also