{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SliderPositions

public final class SliderPositions


Class that holds information about Slider's and RangeSlider's active track and fractional positions where the discrete ticks should be drawn on the track.

Summary

Public constructors

SliderPositions(
    @NonNull ClosedFloatingPointRange<@NonNull Float> initialActiveRange,
    @NonNull float[] initialTickFractions
)

Public methods

boolean
equals(Object other)
final @NonNull ClosedFloatingPointRange<@NonNull Float>

ClosedFloatingPointRange that indicates the current active range for the start to thumb for a Slider and start thumb to end thumb for a RangeSlider.

final @NonNull float[]

The discrete points where a tick should be drawn on the track.

int

Public constructors

SliderPositions

public SliderPositions(
    @NonNull ClosedFloatingPointRange<@NonNull Float> initialActiveRange,
    @NonNull float[] initialTickFractions
)

Public methods

equals

public boolean equals(Object other)

getActiveRange

public final @NonNull ClosedFloatingPointRange<@NonNull FloatgetActiveRange()

ClosedFloatingPointRange that indicates the current active range for the start to thumb for a Slider and start thumb to end thumb for a RangeSlider.

getTickFractions

public final @NonNull float[] getTickFractions()

The discrete points where a tick should be drawn on the track. Each value of tickFractions should be within the range 0f, 1f. If the track is continuous, then tickFractions will be an empty FloatArray.

hashCode

public int hashCode()