Skip to content

Most visited

Recently visited

navigation

AccessibilityNodeInfo.RangeInfo

public static final class AccessibilityNodeInfo.RangeInfo
extends Object

java.lang.Object
   ↳ android.view.accessibility.AccessibilityNodeInfo.RangeInfo


Class with information if a node is a range. Use obtain(int, float, float, float) to get an instance. Recycling is handled by the AccessibilityNodeInfo to which this object is attached.

Summary

Constants

int RANGE_TYPE_FLOAT

Range type: float.

int RANGE_TYPE_INT

Range type: integer.

int RANGE_TYPE_PERCENT

Range type: percent with values from zero to one.

Public methods

float getCurrent()

Gets the current value.

float getMax()

Gets the maximum value.

float getMin()

Gets the minimum value.

int getType()

Gets the range type.

static AccessibilityNodeInfo.RangeInfo obtain(int type, float min, float max, float current)

Obtains a pooled instance.

Inherited methods

From class java.lang.Object

Constants

RANGE_TYPE_FLOAT

added in API level 19
int RANGE_TYPE_FLOAT

Range type: float.

Constant Value: 1 (0x00000001)

RANGE_TYPE_INT

added in API level 19
int RANGE_TYPE_INT

Range type: integer.

Constant Value: 0 (0x00000000)

RANGE_TYPE_PERCENT

added in API level 19
int RANGE_TYPE_PERCENT

Range type: percent with values from zero to one.

Constant Value: 2 (0x00000002)

Public methods

getCurrent

added in API level 19
float getCurrent ()

Gets the current value.

Returns
float The current value.

getMax

added in API level 19
float getMax ()

Gets the maximum value.

Returns
float The maximum value, or Float.POSITIVE_INFINITY if no maximum exists.

getMin

added in API level 19
float getMin ()

Gets the minimum value.

Returns
float The minimum value, or Float.NEGATIVE_INFINITY if no minimum exists.

getType

added in API level 19
int getType ()

Gets the range type.

Returns
int The range type.

See also:

obtain

added in API level 19
AccessibilityNodeInfo.RangeInfo obtain (int type, 
                float min, 
                float max, 
                float current)

Obtains a pooled instance.

Parameters
type int: The type of the range.

min float: The minimum value. Use Float.NEGATIVE_INFINITY if the range has no minimum.

max float: The maximum value. Use Float.POSITIVE_INFINITY if the range has no maximum.

current float: The current value.

Returns
AccessibilityNodeInfo.RangeInfo

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.