AccessibilityNodeInfoCompat.RangeInfoCompat

Added in 1.1.0

public class AccessibilityNodeInfoCompat.RangeInfoCompat


Class with information if a node is a range.

Summary

Constants

static final int

Range type: float.

static final int

Range type: integer.

static final int

Range type: percent with values from zero to one.

Public constructors

RangeInfoCompat(int type, float min, float max, float current)

Creates a new range.

Public methods

float

Gets the current value.

float

Gets the max value.

float

Gets the min value.

int

Gets the range type.

static AccessibilityNodeInfoCompat.RangeInfoCompat
obtain(int type, float min, float max, float current)

Obtains a cached instance if such is available otherwise a new one.

Constants

RANGE_TYPE_FLOAT

Added in 1.1.0
public static final int RANGE_TYPE_FLOAT = 1

Range type: float.

RANGE_TYPE_INT

Added in 1.1.0
public static final int RANGE_TYPE_INT = 0

Range type: integer.

RANGE_TYPE_PERCENT

Added in 1.1.0
public static final int RANGE_TYPE_PERCENT = 2

Range type: percent with values from zero to one.

Public constructors

RangeInfoCompat

Added in 1.12.0
public RangeInfoCompat(int type, float min, float max, float current)

Creates a new range.

Parameters
int type

The type of the range.

float min

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

float max

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

float current

The current value.

Public methods

getCurrent

Added in 1.1.0
public float getCurrent()

Gets the current value.

Returns
float

The current value.

getMax

Added in 1.1.0
public float getMax()

Gets the max value.

Returns
float

The max value.

getMin

Added in 1.1.0
public float getMin()

Gets the min value.

Returns
float

The min value.

getType

Added in 1.1.0
public int getType()

Gets the range type.

Returns
int

The range type.

obtain

Added in 1.1.0
public static AccessibilityNodeInfoCompat.RangeInfoCompat obtain(int type, float min, float max, float current)

Obtains a cached instance if such is available otherwise a new one.

Parameters
int type

The type of the range.

float min

The min value.

float max

The max value.

float current

The current value.