Partager via


AccessibilityRecord.SetSource Method

Definition

Overloads

SetSource(View)

Sets the event source.

SetSource(View, Int32)

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

SetSource(View)

Sets the event 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 source.

Attributes

Exceptions

If called from an AccessibilityService.

Remarks

Sets the event source.

Java documentation for android.view.accessibility.AccessibilityRecord.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 equals to 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 them selves as a tree of virtual views, thus conveying their logical structure.

Java documentation for android.view.accessibility.AccessibilityRecord.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