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

SliderColors

public final class SliderColors


Represents the color used by a Slider in different states.

Summary

Public constructors

SliderColors(
    @NonNull Color thumbColor,
    @NonNull Color activeTrackColor,
    @NonNull Color activeTickColor,
    @NonNull Color inactiveTrackColor,
    @NonNull Color inactiveTickColor,
    @NonNull Color disabledThumbColor,
    @NonNull Color disabledActiveTrackColor,
    @NonNull Color disabledActiveTickColor,
    @NonNull Color disabledInactiveTrackColor,
    @NonNull Color disabledInactiveTickColor
)

create an instance with arbitrary colors.

Public methods

final @NonNull SliderColors
copy(
    @NonNull Color thumbColor,
    @NonNull Color activeTrackColor,
    @NonNull Color activeTickColor,
    @NonNull Color inactiveTrackColor,
    @NonNull Color inactiveTickColor,
    @NonNull Color disabledThumbColor,
    @NonNull Color disabledActiveTrackColor,
    @NonNull Color disabledActiveTickColor,
    @NonNull Color disabledInactiveTrackColor,
    @NonNull Color disabledInactiveTickColor
)

Returns a copy of this SelectableChipColors, optionally overriding some of the values.

boolean
equals(Object other)
final @NonNull Color

colors to be used to draw tick marks on the active track, if steps is specified

final @NonNull Color

color of the track in the part that is "active", meaning that the thumb is ahead of it

final @NonNull Color

colors to be used to draw tick marks on the active track when Slider is disabled and when steps are specified on it

final @NonNull Color

color of the track in the "active" part when the Slider is disabled

final @NonNull Color

colors to be used to draw tick marks on the inactive part of the track when Slider is disabled and when steps are specified on it

final @NonNull Color

color of the track in the "inactive" part when the Slider is disabled

final @NonNull Color

thumb colors when disabled

final @NonNull Color

colors to be used to draw tick marks on the inactive track, if steps are specified on the Slider is specified

final @NonNull Color

color of the track in the part that is "inactive", meaning that the thumb is before it

final @NonNull Color

thumb color when enabled

int

Public constructors

SliderColors

public SliderColors(
    @NonNull Color thumbColor,
    @NonNull Color activeTrackColor,
    @NonNull Color activeTickColor,
    @NonNull Color inactiveTrackColor,
    @NonNull Color inactiveTickColor,
    @NonNull Color disabledThumbColor,
    @NonNull Color disabledActiveTrackColor,
    @NonNull Color disabledActiveTickColor,
    @NonNull Color disabledInactiveTrackColor,
    @NonNull Color disabledInactiveTickColor
)

create an instance with arbitrary colors. See SliderDefaults.colors for the default implementation that follows Material specifications.

Parameters
@NonNull Color thumbColor

thumb color when enabled

@NonNull Color activeTrackColor

color of the track in the part that is "active", meaning that the thumb is ahead of it

@NonNull Color activeTickColor

colors to be used to draw tick marks on the active track, if steps is specified

@NonNull Color inactiveTrackColor

color of the track in the part that is "inactive", meaning that the thumb is before it

@NonNull Color inactiveTickColor

colors to be used to draw tick marks on the inactive track, if steps are specified on the Slider is specified

@NonNull Color disabledThumbColor

thumb colors when disabled

@NonNull Color disabledActiveTrackColor

color of the track in the "active" part when the Slider is disabled

@NonNull Color disabledActiveTickColor

colors to be used to draw tick marks on the active track when Slider is disabled and when steps are specified on it

@NonNull Color disabledInactiveTrackColor

color of the track in the "inactive" part when the Slider is disabled

@NonNull Color disabledInactiveTickColor

colors to be used to draw tick marks on the inactive part of the track when Slider is disabled and when steps are specified on it

Public methods

copy

public final @NonNull SliderColors copy(
    @NonNull Color thumbColor,
    @NonNull Color activeTrackColor,
    @NonNull Color activeTickColor,
    @NonNull Color inactiveTrackColor,
    @NonNull Color inactiveTickColor,
    @NonNull Color disabledThumbColor,
    @NonNull Color disabledActiveTrackColor,
    @NonNull Color disabledActiveTickColor,
    @NonNull Color disabledInactiveTrackColor,
    @NonNull Color disabledInactiveTickColor
)

Returns a copy of this SelectableChipColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

equals

public boolean equals(Object other)

getActiveTickColor

public final @NonNull Color getActiveTickColor()

colors to be used to draw tick marks on the active track, if steps is specified

getActiveTrackColor

public final @NonNull Color getActiveTrackColor()

color of the track in the part that is "active", meaning that the thumb is ahead of it

getDisabledActiveTickColor

public final @NonNull Color getDisabledActiveTickColor()

colors to be used to draw tick marks on the active track when Slider is disabled and when steps are specified on it

getDisabledActiveTrackColor

public final @NonNull Color getDisabledActiveTrackColor()

color of the track in the "active" part when the Slider is disabled

getDisabledInactiveTickColor

public final @NonNull Color getDisabledInactiveTickColor()

colors to be used to draw tick marks on the inactive part of the track when Slider is disabled and when steps are specified on it

getDisabledInactiveTrackColor

public final @NonNull Color getDisabledInactiveTrackColor()

color of the track in the "inactive" part when the Slider is disabled

getDisabledThumbColor

public final @NonNull Color getDisabledThumbColor()

thumb colors when disabled

getInactiveTickColor

public final @NonNull Color getInactiveTickColor()

colors to be used to draw tick marks on the inactive track, if steps are specified on the Slider is specified

getInactiveTrackColor

public final @NonNull Color getInactiveTrackColor()

color of the track in the part that is "inactive", meaning that the thumb is before it

getThumbColor

public final @NonNull Color getThumbColor()

thumb color when enabled

hashCode

public int hashCode()