class SliderColors


Represents the background and content colors used in Slider in different states.

Summary

Public constructors

SliderColors(
    containerColor: Color,
    buttonIconColor: Color,
    selectedBarColor: Color,
    unselectedBarColor: Color,
    selectedBarSeparatorColor: Color,
    unselectedBarSeparatorColor: Color,
    disabledContainerColor: Color,
    disabledButtonIconColor: Color,
    disabledSelectedBarColor: Color,
    disabledUnselectedBarColor: Color,
    disabledSelectedBarSeparatorColor: Color,
    disabledUnselectedBarSeparatorColor: Color
)

create an instance with arbitrary colors.

Public functions

SliderColors
copy(
    containerColor: Color,
    buttonIconColor: Color,
    selectedBarColor: Color,
    unselectedBarColor: Color,
    selectedBarSeparatorColor: Color,
    unselectedBarSeparatorColor: Color,
    disabledContainerColor: Color,
    disabledButtonIconColor: Color,
    disabledSelectedBarColor: Color,
    disabledUnselectedBarColor: Color,
    disabledSelectedBarSeparatorColor: Color,
    disabledUnselectedBarSeparatorColor: Color
)

Returns a copy of this SliderColors optionally overriding some of the values.

open operator Boolean
equals(other: Any?)
open Int

Public properties

Color

The color of the icon of buttons when enabled.

Color

The background color of this Slider when enabled.

Color

The color of the icon of buttons when disabled.

Color

The background color of this Slider when disabled.

Color

The color of the progress bar when disabled.

Color

The color of selected separator between visible segments when disabled.

Color

The background color of the progress bar when disabled.

Color

The color of unselected separator between visible segments when disabled.

Color

The color of the progress bar when enabled.

Color

The color of selected separator between visible segments when enabled.

Color

The background color of the progress bar when enabled.

Color

The color of unselected separator between visible segments when enabled.

Public constructors

SliderColors

Added in 1.5.0
SliderColors(
    containerColor: Color,
    buttonIconColor: Color,
    selectedBarColor: Color,
    unselectedBarColor: Color,
    selectedBarSeparatorColor: Color,
    unselectedBarSeparatorColor: Color,
    disabledContainerColor: Color,
    disabledButtonIconColor: Color,
    disabledSelectedBarColor: Color,
    disabledUnselectedBarColor: Color,
    disabledSelectedBarSeparatorColor: Color,
    disabledUnselectedBarSeparatorColor: Color
)

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

Parameters
containerColor: Color

The background color of this Slider when enabled.

buttonIconColor: Color

The color of the icon of buttons when enabled.

selectedBarColor: Color

The color of the progress bar when enabled.

unselectedBarColor: Color

The background color of the progress bar when enabled.

selectedBarSeparatorColor: Color

The color of selected separator between visible segments when enabled.

unselectedBarSeparatorColor: Color

The color of unselected separator between visible segments when enabled.

disabledContainerColor: Color

The background color of this Slider when disabled.

disabledButtonIconColor: Color

The color of the icon of buttons when disabled.

disabledSelectedBarColor: Color

The color of the progress bar when disabled.

disabledUnselectedBarColor: Color

The background color of the progress bar when disabled.

disabledSelectedBarSeparatorColor: Color

The color of selected separator between visible segments when disabled.

disabledUnselectedBarSeparatorColor: Color

The color of unselected separator between visible segments when disabled.

Public functions

copy

Added in 1.6.0
fun copy(
    containerColor: Color = this.containerColor,
    buttonIconColor: Color = this.buttonIconColor,
    selectedBarColor: Color = this.selectedBarColor,
    unselectedBarColor: Color = this.unselectedBarColor,
    selectedBarSeparatorColor: Color = this.selectedBarSeparatorColor,
    unselectedBarSeparatorColor: Color = this.unselectedBarSeparatorColor,
    disabledContainerColor: Color = this.disabledContainerColor,
    disabledButtonIconColor: Color = this.disabledButtonIconColor,
    disabledSelectedBarColor: Color = this.disabledSelectedBarColor,
    disabledUnselectedBarColor: Color = this.disabledUnselectedBarColor,
    disabledSelectedBarSeparatorColor: Color = this.disabledSelectedBarSeparatorColor,
    disabledUnselectedBarSeparatorColor: Color = this.disabledUnselectedBarSeparatorColor
): SliderColors

Returns a copy of this SliderColors optionally overriding some of the values.

Parameters
containerColor: Color = this.containerColor

The background color of this Slider when enabled.

buttonIconColor: Color = this.buttonIconColor

The color of the icon of buttons when enabled.

selectedBarColor: Color = this.selectedBarColor

The color of the progress bar when enabled.

unselectedBarColor: Color = this.unselectedBarColor

The background color of the progress bar when enabled.

selectedBarSeparatorColor: Color = this.selectedBarSeparatorColor

The color of selected separator between visible segments when enabled.

unselectedBarSeparatorColor: Color = this.unselectedBarSeparatorColor

The color of unselected separator between visible segments when enabled.

disabledContainerColor: Color = this.disabledContainerColor

The background color of this Slider when disabled.

disabledButtonIconColor: Color = this.disabledButtonIconColor

The color of the icon of buttons when disabled.

disabledSelectedBarColor: Color = this.disabledSelectedBarColor

The color of the progress bar when disabled.

disabledUnselectedBarColor: Color = this.disabledUnselectedBarColor

The background color of the progress bar when disabled.

disabledSelectedBarSeparatorColor: Color = this.disabledSelectedBarSeparatorColor

The color of selected separator between visible segments when disabled.

disabledUnselectedBarSeparatorColor: Color = this.disabledUnselectedBarSeparatorColor

The color of unselected separator between visible segments when disabled.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

buttonIconColor

val buttonIconColor: Color

The color of the icon of buttons when enabled.

containerColor

val containerColor: Color

The background color of this Slider when enabled.

disabledButtonIconColor

val disabledButtonIconColor: Color

The color of the icon of buttons when disabled.

disabledContainerColor

val disabledContainerColor: Color

The background color of this Slider when disabled.

disabledSelectedBarColor

val disabledSelectedBarColor: Color

The color of the progress bar when disabled.

disabledSelectedBarSeparatorColor

val disabledSelectedBarSeparatorColor: Color

The color of selected separator between visible segments when disabled.

disabledUnselectedBarColor

val disabledUnselectedBarColor: Color

The background color of the progress bar when disabled.

disabledUnselectedBarSeparatorColor

val disabledUnselectedBarSeparatorColor: Color

The color of unselected separator between visible segments when disabled.

selectedBarColor

val selectedBarColor: Color

The color of the progress bar when enabled.

selectedBarSeparatorColor

val selectedBarSeparatorColor: Color

The color of selected separator between visible segments when enabled.

unselectedBarColor

val unselectedBarColor: Color

The background color of the progress bar when enabled.

unselectedBarSeparatorColor

val unselectedBarSeparatorColor: Color

The color of unselected separator between visible segments when enabled.