Udostępnij za pośrednictwem


AccessibilityNodeProvider.CreateAccessibilityNodeInfo(Int32) Method

Definition

Returns an AccessibilityNodeInfo representing a virtual view, such as a descendant of the host View, with the given virtualViewId or the host View itself if virtualViewId equals to #HOST_VIEW_ID.

[Android.Runtime.Register("createAccessibilityNodeInfo", "(I)Landroid/view/accessibility/AccessibilityNodeInfo;", "GetCreateAccessibilityNodeInfo_IHandler")]
public virtual Android.Views.Accessibility.AccessibilityNodeInfo? CreateAccessibilityNodeInfo (int virtualViewId);
[<Android.Runtime.Register("createAccessibilityNodeInfo", "(I)Landroid/view/accessibility/AccessibilityNodeInfo;", "GetCreateAccessibilityNodeInfo_IHandler")>]
abstract member CreateAccessibilityNodeInfo : int -> Android.Views.Accessibility.AccessibilityNodeInfo
override this.CreateAccessibilityNodeInfo : int -> Android.Views.Accessibility.AccessibilityNodeInfo

Parameters

virtualViewId
Int32

A client defined virtual view id.

Returns

A populated AccessibilityNodeInfo for a virtual descendant or the host View.

Attributes

Remarks

Returns an AccessibilityNodeInfo representing a virtual view, such as a descendant of the host View, with the given virtualViewId or the host View itself if virtualViewId equals to #HOST_VIEW_ID.

A virtual descendant is an imaginary View that is reported as a part of the view hierarchy for accessibility purposes. This enables custom views that draw complex content to report them selves as a tree of virtual views, thus conveying their logical structure.

The implementer is responsible for obtaining an accessibility node info from the pool of reusable instances and setting the desired properties of the node info before returning it.

Java documentation for android.view.accessibility.AccessibilityNodeProvider.createAccessibilityNodeInfo(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