RangeSliderState
-
Cmn
@ExperimentalMaterial3Api
class RangeSliderState
Class that holds information about RangeSlider's active range.
Summary
Public companion functions |
||
|---|---|---|
Saver<RangeSliderState, *> |
Saver(The default |
Cmn
|
Public constructors |
|
|---|---|
RangeSliderState( |
Cmn
|
Public properties |
||
|---|---|---|
Float |
|
Cmn
|
Float |
|
Cmn
|
(() -> Unit)? |
lambda to be invoked when value change has ended. |
Cmn
|
Int |
if positive, specifies the amount of discrete allowable values between the endpoints of |
Cmn
|
ClosedFloatingPointRange<Float> |
range of values that Range Slider values can take. |
Cmn
|
Public companion functions
Saver
fun Saver(
onValueChangeFinished: (() -> Unit)?,
valueRange: ClosedFloatingPointRange<Float>
): Saver<RangeSliderState, *>
The default Saver implementation for RangeSliderState.
| Parameters | |
|---|---|
onValueChangeFinished: (() -> Unit)? |
lambda to be invoked when value change has ended. This callback shouldn't be used to update the range slider values (use |
valueRange: ClosedFloatingPointRange<Float> |
range of values that Range Slider values can take. |
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 |
|
activeRangeEnd: Float = 1.0f |
|
steps: @IntRange(from = 0) Int = 0 |
if positive, specifies the amount of discrete allowable values between the endpoints of |
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 |
valueRange: ClosedFloatingPointRange<Float> = 0f..1f |
range of values that Range Slider values can take. |
Public properties
activeRangeEnd
var activeRangeEnd: Float
Float that indicates the end of the current active range for the RangeSlider.
activeRangeStart
var activeRangeStart: Float
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 steps: Int
if positive, specifies the amount of discrete allowable values between the endpoints of valueRange. For example, a range from 0 to 10 with 4 steps allows 4 values evenly distributed between 0 and 10 (i.e., 2, 4, 6, 8). If steps is 0, the slider will behave continuously and allow any value from the range. Must not be negative.
valueRange
val valueRange: ClosedFloatingPointRange<Float>
range of values that Range Slider values can take. activeRangeStart and activeRangeEnd will be coerced to this range.