言語

AccessibilityNodeInfo.AccessibilityAction Class

Definition

A class defining an action that can be performed on an AccessibilityNodeInfo.

[Android.Runtime.Register("android/view/accessibility/AccessibilityNodeInfo$AccessibilityAction", DoNotGenerateAcw=true)]
public sealed class AccessibilityNodeInfo.AccessibilityAction : Java.Lang.Object, Android.OS.IParcelable, IDisposable
[<Android.Runtime.Register("android/view/accessibility/AccessibilityNodeInfo$AccessibilityAction", DoNotGenerateAcw=true)>]
type AccessibilityNodeInfo.AccessibilityAction = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
AccessibilityNodeInfo.AccessibilityAction
Attributes
Implements

Remarks

A class defining an action that can be performed on an AccessibilityNodeInfo. Each action has a mandatory unique id and optional data.

There are three categories of actions: <ul> <li><strong>Standard actions</strong> - These are actions that are reported and handled by the standard UI widgets in the platform. For each standard action there is a static constant defined in this class, e.g. #ACTION_FOCUS. These actions will have null labels. </li> <li><strong>Custom actions action</strong> - These are actions that are reported and handled by custom widgets. i.e. ones that are not part of the UI toolkit. For example, an application may define a custom action for clearing the user history. </li> <li><strong>Overridden standard actions</strong> - These are actions that override standard actions to customize them. For example, an app may add a label to the standard #ACTION_CLICK action to indicate to the user that this action clears browsing history. </ul>

Actions are typically added to an AccessibilityNodeInfo by using AccessibilityNodeInfo#addAction(AccessibilityAction) within View#onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo) and are performed within View#performAccessibilityAction(int, Bundle).

"note"> <b>Note:</b> Views which support these actions should invoke <c>View#setImportantForAccessibility(int)</c> with <c>View#IMPORTANT_FOR_ACCESSIBILITY_YES</c> to ensure an <c>AccessibilityService</c> can discover the set of supported actions. </aside>

"note"> <b>Note:</b> Use <c>androidx.core.view.ViewCompat#addAccessibilityAction(View, CharSequence, AccessibilityViewCommand)</c> to register an action directly on the view. </aside>

Java documentation for android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction.

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.

Constructors

Name Description
AccessibilityNodeInfo.AccessibilityAction(Int32, ICharSequence)

Creates a new AccessibilityAction.

AccessibilityNodeInfo.AccessibilityAction(Int32, String)

Creates a new AccessibilityAction.

Properties

Name Description
ActionAccessibilityFocus

Action that gives accessibility focus to the node.

ActionClearAccessibilityFocus

Action that clears accessibility focus of the node.

ActionClearFocus

Action that clears input focus of the node.

ActionClearSelection

Action that deselects the node.

ActionClick

Action that clicks on the node info.

ActionCollapse

Action to collapse an expandable node.

ActionContextClick

Action that context clicks the node.

ActionCopy

Action to copy the current selection to the clipboard.

ActionCut

Action to cut the current selection and place it to the clipboard.

ActionDismiss

Action to dismiss a dismissable node.

ActionDragCancel

Action to cancel a drag.

ActionDragDrop

Action to trigger a drop of the content being dragged.

ActionDragStart

Action to start a drag.

ActionExpand

Action to expand an expandable node.

ActionFocus

Action that gives input focus to the node.

ActionHideTooltip

Action to hide a tooltip.

ActionImeEnter

Action to send an IME actionId from EditorInfo.actionId.

ActionLongClick

Action that long clicks on the node.

ActionMoveWindow

Action to move a window to a new location.

ActionNextAtMovementGranularity

Action that requests to go to the next entity in this node's text at a given movement granularity.

ActionNextHtmlElement

Action to move to the next HTML element of a given type.

ActionPageDown

Action to move to the page below.

ActionPageLeft

Action to move to the page left.

ActionPageRight

Action to move to the page right.

ActionPageUp

Action to move to the page above.

ActionPaste

Action to paste the current clipboard content.

ActionPressAndHold

Action that presses and holds a node.

ActionPreviousAtMovementGranularity

Action that requests to go to the previous entity in this node's text at a given movement granularity.

ActionPreviousHtmlElement

Action to move to the previous HTML element of a given type.

ActionScrollBackward

Action to scroll the node content backward.

ActionScrollDown

Action to scroll the node content down.

ActionScrollForward

Action to scroll the node content forward.

ActionScrollInDirection

Action that brings fully on screen the next node in the specified direction.

ActionScrollLeft

Action to scroll the node content left.

ActionScrollRight

Action to scroll the node content right.

ActionScrollToPosition

Action that scrolls the node to make the specified collection position visible on screen.

ActionScrollUp

Action to scroll the node content up.

ActionSelect

Action that selects the node.

ActionSetExtendedSelection

Action to set the extended selection.

ActionSetProgress

Action that sets progress between RangeInfo.getMin() and RangeInfo.getMax().

ActionSetSelection

Action to set the selection.

ActionSetText

Action that sets the text of the node.

ActionShowOnScreen

Action that requests the node make its bounding rectangle visible on the screen, scrolling if necessary just enough.

ActionShowTextSuggestions

Action to show suggestions for editable text.

ActionShowTooltip

Action to show a tooltip.

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
Handle

The handle to the underlying Android instance.

(Inherited from Object)
Id

Gets the id for this action.

JniIdentityHashCode

Gets the identity hash code assigned to this Java peer by the interop runtime.

(Inherited from Object)
JniManagedPeerState (Inherited from JavaObject)
JniPeerMembers
Label
LabelFormatted

Gets the label for this action.

PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Name Description
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Construct(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
DescribeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Dispose()

Releases the resources held by this Java peer.

(Inherited from Object)
Dispose(Boolean)

Releases the resources held by this Java peer.

(Inherited from Object)
DisposeUnlessReferenced() (Inherited from JavaObject)
Equals(Object) (Inherited from JavaObject)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()
Obsolete.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
ToArray<T>()

Creates a managed array from this Java array wrapper.

(Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime()

Unregisters this Java peer from the interop runtime.

(Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Write data into a parcel.

Explicit Interface Implementations

Name Description
IJavaPeerable.Disposed() (Inherited from JavaObject)
IJavaPeerable.Finalized() (Inherited from JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock (Inherited from JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from JavaObject)
IJavaPeerable.UnregisterFromRuntime()

Extension Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to