Język

AccessibilityNodeInfo.SetSelection(AccessibilityNodeInfo+Selection) Method

Definition

Sets the extended selection, which is a representation of selection that spans multiple nodes that exist within the subtree of the node defining selection.

[Android.Runtime.Register("setSelection", "(Landroid/view/accessibility/AccessibilityNodeInfo$Selection;)V", "GetSetSelection_Landroid_view_accessibility_AccessibilityNodeInfo_Selection_Handler", ApiSince=36)]
public virtual void SetSelection(Android.Views.Accessibility.AccessibilityNodeInfo.Selection? selection);
[<Android.Runtime.Register("setSelection", "(Landroid/view/accessibility/AccessibilityNodeInfo$Selection;)V", "GetSetSelection_Landroid_view_accessibility_AccessibilityNodeInfo_Selection_Handler", ApiSince=36)>]
abstract member SetSelection : Android.Views.Accessibility.AccessibilityNodeInfo.Selection -> unit
override this.SetSelection : Android.Views.Accessibility.AccessibilityNodeInfo.Selection -> unit

Parameters

selection
AccessibilityNodeInfo.Selection

The extended selection within the node's subtree, or null if no selection exists.

Attributes

Remarks

Sets the extended selection, which is a representation of selection that spans multiple nodes that exist within the subtree of the node defining selection.

Note: The start and end SelectionPosition of the provided Selection should be constructed with this node or a descendant of it.

Note: AccessibilityNodeInfo.setFocusable and AccessibilityNodeInfo.setFocused should both be called with true before setting the selection in order to make this node a candidate to contain a selection.

Note: Cannot be called from an AccessibilityService. This class is made immutable before being delivered to an AccessibilityService.

Android reference for android.view.accessibility.AccessibilityNodeInfo.setSelection.

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