Added in API level 19

RangeInfo


class RangeInfo
kotlin.Any
   ↳ android.view.accessibility.AccessibilityNodeInfo.RangeInfo

Class with information if a node is a range.

Summary

Constants
static Int

Range type: float.

static Int

Range type: integer.

static Int

Range type: percent with values from zero to one hundred.

Public constructors
RangeInfo(type: Int, min: Float, max: Float, current: Float)

Creates a new range.

Public methods
Float

Gets the current value.

Float

Gets the maximum value.

Float

Gets the minimum value.

Int

Gets the range type.

static AccessibilityNodeInfo.RangeInfo!
obtain(type: Int, min: Float, max: Float, current: Float)

Instantiates a new RangeInfo.

Constants

RANGE_TYPE_FLOAT

Added in API level 19
static val RANGE_TYPE_FLOAT: Int

Range type: float.

Value: 1

RANGE_TYPE_INT

Added in API level 19
static val RANGE_TYPE_INT: Int

Range type: integer.

Value: 0

RANGE_TYPE_PERCENT

Added in API level 19
static val RANGE_TYPE_PERCENT: Int

Range type: percent with values from zero to one hundred.

Value: 2

Public constructors

RangeInfo

Added in API level 30
RangeInfo(
    type: Int,
    min: Float,
    max: Float,
    current: Float)

Creates a new range.

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.

Public methods

getCurrent

Added in API level 19
fun getCurrent(): Float

Gets the current value.

Return
Float The current value.

getMax

Added in API level 19
fun getMax(): Float

Gets the maximum value.

Return
Float The maximum value, or Float.POSITIVE_INFINITY if no maximum exists.

getMin

Added in API level 19
fun getMin(): Float

Gets the minimum value.

Return
Float The minimum value, or Float.NEGATIVE_INFINITY if no minimum exists.

getType

Added in API level 19
fun getType(): Int

Gets the range type.

Return
Int The range type.

obtain

Added in API level 19
Deprecated in API level 33
static fun obtain(
    type: Int,
    min: Float,
    max: Float,
    current: Float
): AccessibilityNodeInfo.RangeInfo!

Deprecated: Object pooling has been discontinued. Create a new instance using the constructor AccessibilityNodeInfo.RangeInfo#RangeInfo(int, float, float, instead.

Instantiates a new RangeInfo.

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.