Share via


AccessibilityNodeInfo.ActionArgumentScrollAmountFloat Field

Definition

Argument to represent the scroll amount as a percent of the visible area of a node, with 1.

[Android.Runtime.Register("ACTION_ARGUMENT_SCROLL_AMOUNT_FLOAT", ApiSince=35)]
public const string ActionArgumentScrollAmountFloat;
[<Android.Runtime.Register("ACTION_ARGUMENT_SCROLL_AMOUNT_FLOAT", ApiSince=35)>]
val mutable ActionArgumentScrollAmountFloat : string

Field Value

Implements

Attributes

Remarks

Argument to represent the scroll amount as a percent of the visible area of a node, with 1.0F as the default. Values smaller than 1.0F represent a partial scroll of the node, and values larger than 1.0F represent a scroll that extends beyond the currently visible node Rect. Setting this to Float#POSITIVE_INFINITY or to another "too large" value should scroll to the end of the node. Negative values should not be used with this argument.

This argument should be used with the following scroll actions: <ul> <li>AccessibilityAction#ACTION_SCROLL_FORWARD</li> <li>AccessibilityAction#ACTION_SCROLL_BACKWARD</li> <li>AccessibilityAction#ACTION_SCROLL_UP</li> <li>AccessibilityAction#ACTION_SCROLL_DOWN</li> <li>AccessibilityAction#ACTION_SCROLL_LEFT</li> <li>AccessibilityAction#ACTION_SCROLL_RIGHT</li> </ul>

Example: if a view representing a list of items implements AccessibilityAction#ACTION_SCROLL_FORWARD to scroll forward by an entire screen (one "page"), then passing a value of .25F via this argument should scroll that view only by 1/4th of a screen. Passing a value of 1.50F via this argument should scroll the view by 1 1/2 screens or to end of the node if the node doesn't extend to 1 1/2 screens.

This argument should not be used with the following scroll actions, which don't cleanly conform to granular scroll semantics: <ul> <li>AccessibilityAction#ACTION_SCROLL_IN_DIRECTION</li> <li>AccessibilityAction#ACTION_SCROLL_TO_POSITION</li> </ul>

Views that support this argument should set #setGranularScrollingSupported(boolean) to true. Clients should use #isGranularScrollingSupported() to check if granular scrolling is supported.

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

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