RangeSliderState


Class that holds information about RangeSlider's active range.

Summary

Public constructors

RangeSliderState(
    activeRangeStart: Float,
    activeRangeEnd: Float,
    steps: @IntRange(from = 0) Int,
    onValueChangeFinished: (() -> Unit)?,
    valueRange: ClosedFloatingPointRange<Float>
)
Cmn

Public properties

Float

Float that indicates the end of the current active range for the RangeSlider.

Cmn
Float

Float that indicates the start of the current active range for the RangeSlider.

Cmn
(() -> Unit)?

lambda to be invoked when value change has ended.

Cmn
Int

if positive, specifies the amount of discrete allowable values (in addition to the endpoints of the value range).

Cmn
ClosedFloatingPointRange<Float>

range of values that Range Slider values can take.

Cmn

Public constructors

RangeSliderState

RangeSliderState(
    activeRangeStart: Float = 0.0f,
    activeRangeEnd: Float = 1.0f,
    steps: @IntRange(from = 0) Int = 0,
    onValueChangeFinished: (() -> Unit)? = null,
    valueRange: ClosedFloatingPointRange<Float> = 0f..1f
)
Parameters
activeRangeStart: Float = 0.0f

Float that indicates the initial start of the active range of the slider. If outside of valueRange provided, value will be coerced to this range.

activeRangeEnd: Float = 1.0f

Float that indicates the initial end of the active range of the slider. If outside of valueRange provided, value will be coerced to this range.

steps: @IntRange(from = 0) Int = 0

if positive, specifies the amount of discrete allowable values (in addition to the endpoints of the value range). Step values are evenly distributed across the range. If 0, the range slider will behave continuously and allow any value from the range. Must not be negative.

onValueChangeFinished: (() -> Unit)? = null

lambda to be invoked when value change has ended. This callback shouldn't be used to update the range slider values (use onValueChange for that), but rather to know when the user has completed selecting a new value by ending a drag or a click.

valueRange: ClosedFloatingPointRange<Float> = 0f..1f

range of values that Range Slider values can take. activeRangeStart and activeRangeEnd will be coerced to this range.

Public properties

activeRangeEnd

var activeRangeEndFloat

Float that indicates the end of the current active range for the RangeSlider.

activeRangeStart

var activeRangeStartFloat

Float that indicates the start of the current active range for the RangeSlider.

onValueChangeFinished

var onValueChangeFinished: (() -> Unit)?

lambda to be invoked when value change has ended. This callback shouldn't be used to update the range slider values (use onValueChange for that), but rather to know when the user has completed selecting a new value by ending a drag or a click.

steps

val stepsInt

if positive, specifies the amount of discrete allowable values (in addition to the endpoints of the value range). Step values are evenly distributed across the range. If 0, the range slider will behave continuously and allow any value from the range. Must not be negative.

valueRange

val valueRangeClosedFloatingPointRange<Float>

range of values that Range Slider values can take. activeRangeStart and activeRangeEnd will be coerced to this range.