Sdílet prostřednictvím


ViewStructure.AsyncNewChild(Int32) Method

Definition

Like #newChild, but allows the caller to asynchronously populate the returned child.

[Android.Runtime.Register("asyncNewChild", "(I)Landroid/view/ViewStructure;", "GetAsyncNewChild_IHandler", ApiSince=23)]
public abstract Android.Views.ViewStructure? AsyncNewChild (int index);
[<Android.Runtime.Register("asyncNewChild", "(I)Landroid/view/ViewStructure;", "GetAsyncNewChild_IHandler", ApiSince=23)>]
abstract member AsyncNewChild : int -> Android.Views.ViewStructure

Parameters

index
Int32

Returns

Returns an fresh ViewStructure ready to be filled in.

Attributes

Remarks

Like #newChild, but allows the caller to asynchronously populate the returned child. It can transfer the returned ViewStructure to another thread for it to build its content (and children etc). Once done, some thread must call #asyncCommit to tell the containing ViewStructure that the async population is done.

<b>NOTE: </b>you must pre-allocate space for the child first, by calling either #addChildCount(int) or #setChildCount(int).

Java documentation for android.view.ViewStructure.asyncNewChild(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