Android.Views.Accessibility.AccessibilityNodeInfo.SetLabelFor Method
Sets the view for which the view represented by this info serves as a label for accessibility purposes.

Syntax

[Android.Runtime.Register("setLabelFor", "(Landroid/view/View;I)V", "GetSetLabelFor_Landroid_view_View_IHandler")]
public virtual void SetLabelFor (Android.Views.View root, int virtualDescendantId)

Parameters

root
The root whose virtual descendant serves as a label.
virtualDescendantId
The id of the virtual descendant.

Remarks

Sets the view for which the view represented by this info serves as a label for accessibility purposes. If virtualDescendantId is Android.Views.View.NoId the root is set as the labeled.

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 themselves as a tree of virtual views, thus conveying their logical structure.

Note: Cannot be called from an Android.AccessibilityServices.AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

[Android Documentation]

Requirements

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