AccessibilityNodeInfo.SetLabeledBy 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
SetLabeledBy(View) |
Sets the view which serves as the label of the view represented by this info for accessibility purposes. |
SetLabeledBy(View, Int32) |
Sets the view which serves as the label of the view represented by this info for accessibility purposes. |
SetLabeledBy(View)
Sets the view which serves as the label of the view represented by this info for accessibility purposes.
[Android.Runtime.Register("setLabeledBy", "(Landroid/view/View;)V", "GetSetLabeledBy_Landroid_view_View_Handler")]
public virtual void SetLabeledBy (Android.Views.View? label);
[<Android.Runtime.Register("setLabeledBy", "(Landroid/view/View;)V", "GetSetLabeledBy_Landroid_view_View_Handler")>]
abstract member SetLabeledBy : Android.Views.View -> unit
override this.SetLabeledBy : Android.Views.View -> unit
Parameters
- label
- View
The view that labels this node's source.
- Attributes
Remarks
Sets the view which serves as the label of the view represented by this info 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
SetLabeledBy(View, Int32)
Sets the view which serves as the label of the view represented by this info for accessibility purposes.
[Android.Runtime.Register("setLabeledBy", "(Landroid/view/View;I)V", "GetSetLabeledBy_Landroid_view_View_IHandler")]
public virtual void SetLabeledBy (Android.Views.View? root, int virtualDescendantId);
[<Android.Runtime.Register("setLabeledBy", "(Landroid/view/View;I)V", "GetSetLabeledBy_Landroid_view_View_IHandler")>]
abstract member SetLabeledBy : Android.Views.View * int -> unit
override this.SetLabeledBy : Android.Views.View * int -> unit
Parameters
- root
- View
The root whose virtual descendant labels this node's source.
- virtualDescendantId
- Int32
The id of the virtual descendant.
- Attributes
Remarks
Sets the view which serves as the label of the view represented by this info for accessibility purposes. If virtualDescendantId
is View#NO_ID
the root is set as the label.
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.