Share via


ViewGroup.RemoveAllViewsInLayout Method

Definition

Called by a ViewGroup subclass to remove child views from itself, when it must first know its size on screen before it can calculate how many child views it will render.

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

Remarks

Called by a ViewGroup subclass to remove child views from itself, when it must first know its size on screen before it can calculate how many child views it will render. An example is a Gallery or a ListView, which may "have" 50 children, but actually only render the number of children that can currently fit inside the object on screen. Do not call this method unless you are extending ViewGroup and understand the view measuring and layout pipeline.

<strong>Note:</strong> do not invoke this method from #draw(android.graphics.Canvas), #onDraw(android.graphics.Canvas), #dispatchDraw(android.graphics.Canvas) or any related method.

Java documentation for android.view.ViewGroup.removeAllViewsInLayout().

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