AccessibilityNodeInfo.SetLabelFor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetLabelFor(View) |
Sets the view for which the view represented by this info serves as a label for accessibility purposes. |
SetLabelFor(View, Int32) |
Sets the view for which the view represented by this info serves as a label for accessibility purposes. |
SetLabelFor(View)
Sets the view for which the view represented by this info serves as a label for accessibility purposes.
[Android.Runtime.Register("setLabelFor", "(Landroid/view/View;)V", "GetSetLabelFor_Landroid_view_View_Handler")]
public virtual void SetLabelFor (Android.Views.View? labeled);
[<Android.Runtime.Register("setLabelFor", "(Landroid/view/View;)V", "GetSetLabelFor_Landroid_view_View_Handler")>]
abstract member SetLabelFor : Android.Views.View -> unit
override this.SetLabelFor : Android.Views.View -> unit
Parameters
- labeled
- View
The view for which this info serves as a label.
- Attributes
Remarks
Sets the view for which the view represented by this info serves as a label for accessibility purposes.
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
SetLabelFor(View, Int32)
Sets the view for which the view represented by this info serves as a label for accessibility purposes.
[Android.Runtime.Register("setLabelFor", "(Landroid/view/View;I)V", "GetSetLabelFor_Landroid_view_View_IHandler")]
public virtual void SetLabelFor (Android.Views.View? root, int virtualDescendantId);
[<Android.Runtime.Register("setLabelFor", "(Landroid/view/View;I)V", "GetSetLabelFor_Landroid_view_View_IHandler")>]
abstract member SetLabelFor : Android.Views.View * int -> unit
override this.SetLabelFor : Android.Views.View * int -> unit
Parameters
- root
- View
The root whose virtual descendant serves as a label.
- virtualDescendantId
- Int32
The id of the virtual descendant.
- Attributes
Remarks
Sets the view for which the view represented by this info serves as a label for accessibility purposes. If virtualDescendantId
is View#NO_ID
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.
<strong>Note:</strong> Cannot be called from an android.accessibilityservice.AccessibilityService
. This class is made immutable before being delivered to an AccessibilityService.
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.