setSource

open fun setSource(source: View)(source)

Deprecated

Use setSource directly.

Sets the event source.

Parameters

source

The source.

Throws

If called from an AccessibilityService.


open fun setSource(root: View, virtualDescendantId: Int)(source)

Deprecated

Use setSource instead.

Sets the source to be a virtual descendant of the given root. If virtualDescendantId equals to 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.

Parameters

root

The root of the virtual subtree.

virtualDescendantId

The id of the virtual descendant.


open fun setSource(@NonNull record: AccessibilityRecord, @Nullable root: View, virtualDescendantId: Int)(source)

Deprecated

Call setSource directly.

Sets the source to be a virtual descendant of the given root. If virtualDescendantId equals to 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.

Parameters

record

The AccessibilityRecord instance to use.

root

The root of the virtual subtree.

virtualDescendantId

The id of the virtual descendant.