AccessibilityNodeInfo.SetSource Method

Definition

Overloads

SetSource(View)

Sets the source.

SetSource(View, Int32)

Sets the source to be a virtual descendant of the given root.

SetSource(View)

Sets the source.

[Android.Runtime.Register("setSource", "(Landroid/view/View;)V", "GetSetSource_Landroid_view_View_Handler")]
public virtual void SetSource (Android.Views.View? source);
[<Android.Runtime.Register("setSource", "(Landroid/view/View;)V", "GetSetSource_Landroid_view_View_Handler")>]
abstract member SetSource : Android.Views.View -> unit
override this.SetSource : Android.Views.View -> unit

Parameters

source
View

The info source.

Attributes

Remarks

Sets the source.

<strong>Note:</strong> Cannot be called from an android.accessibilityservice.AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.setSource(android.view.View).

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

SetSource(View, Int32)

Sets the source to be a virtual descendant of the given root.

[Android.Runtime.Register("setSource", "(Landroid/view/View;I)V", "GetSetSource_Landroid_view_View_IHandler")]
public virtual void SetSource (Android.Views.View? root, int virtualDescendantId);
[<Android.Runtime.Register("setSource", "(Landroid/view/View;I)V", "GetSetSource_Landroid_view_View_IHandler")>]
abstract member SetSource : Android.Views.View * int -> unit
override this.SetSource : Android.Views.View * int -> unit

Parameters

root
View

The root of the virtual subtree.

virtualDescendantId
Int32

The id of the virtual descendant.

Attributes

Remarks

Sets the source to be a virtual descendant of the given root. If virtualDescendantId is View#NO_ID the root is set as the source.

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.

Java documentation for android.view.accessibility.AccessibilityNodeInfo.setSource(android.view.View, 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