ListItemColors


Represents the colors of a list item in different states.

Summary

Public constructors

ListItemColors(
    containerColor: Color,
    headlineColor: Color,
    leadingIconColor: Color,
    overlineColor: Color,
    supportingTextColor: Color,
    trailingIconColor: Color,
    disabledHeadlineColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

This function is deprecated. Use overload with parameters for selected and dragged colors

Cmn
ListItemColors(
    containerColor: Color,
    contentColor: Color,
    leadingContentColor: Color,
    trailingContentColor: Color,
    overlineContentColor: Color,
    supportingContentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledLeadingContentColor: Color,
    disabledTrailingContentColor: Color,
    disabledOverlineContentColor: Color,
    disabledSupportingContentColor: Color,
    selectedContainerColor: Color,
    selectedContentColor: Color,
    selectedLeadingContentColor: Color,
    selectedTrailingContentColor: Color,
    selectedOverlineContentColor: Color,
    selectedSupportingContentColor: Color,
    draggedContainerColor: Color,
    draggedContentColor: Color,
    draggedLeadingContentColor: Color,
    draggedTrailingContentColor: Color,
    draggedOverlineContentColor: Color,
    draggedSupportingContentColor: Color
)
Cmn

Public functions

Color
containerColor(enabled: Boolean, selected: Boolean, dragged: Boolean)

Returns the container color of the list item based on the current state.

Cmn
Color
contentColor(enabled: Boolean, selected: Boolean, dragged: Boolean)

Returns the content color of the list item based on the current state.

Cmn
ListItemColors
copy(
    containerColor: Color,
    headlineColor: Color,
    leadingIconColor: Color,
    overlineColor: Color,
    supportingTextColor: Color,
    trailingIconColor: Color,
    disabledHeadlineColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

This function is deprecated. Use overload with parameters for selected and dragged colors

Cmn
ListItemColors
copy(
    containerColor: Color,
    contentColor: Color,
    leadingContentColor: Color,
    trailingContentColor: Color,
    overlineContentColor: Color,
    supportingContentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledLeadingContentColor: Color,
    disabledTrailingContentColor: Color,
    disabledOverlineContentColor: Color,
    disabledSupportingContentColor: Color,
    selectedContainerColor: Color,
    selectedContentColor: Color,
    selectedLeadingContentColor: Color,
    selectedTrailingContentColor: Color,
    selectedOverlineContentColor: Color,
    selectedSupportingContentColor: Color,
    draggedContainerColor: Color,
    draggedContentColor: Color,
    draggedLeadingContentColor: Color,
    draggedTrailingContentColor: Color,
    draggedOverlineContentColor: Color,
    draggedSupportingContentColor: Color
)

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

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
Color
leadingContentColor(enabled: Boolean, selected: Boolean, dragged: Boolean)

Returns the color of the leading content of the list item based on the current state.

Cmn
Color
overlineContentColor(enabled: Boolean, selected: Boolean, dragged: Boolean)

Returns the color of the overline content of the list item based on the current state.

Cmn
Color
supportingContentColor(
    enabled: Boolean,
    selected: Boolean,
    dragged: Boolean
)

Returns the color of the supporting content of the list item based on the current state.

Cmn
Color
trailingContentColor(enabled: Boolean, selected: Boolean, dragged: Boolean)

Returns the color of the trailing content of the list item based on the current state.

Cmn

Public properties

Color

the container color of the list item.

Cmn
Color

the content color of the list item.

Cmn
Color

the container color of the list item when disabled.

Cmn
Color

the content color of the list item when disabled.

Cmn
Color

This property is deprecated. Renamed to disabledContentColor

Cmn
Color

the color of the leading content of the list item when disabled.

Cmn
Color

This property is deprecated. Renamed to disabledLeadingContentColor

Cmn
Color

the color of the overline content of the list item when disabled.

Cmn
Color

the color of the supporting content of the list item when disabled.

Cmn
Color

the color of the trailing content of the list item when disabled.

Cmn
Color

This property is deprecated. Renamed to disabledTrailingContentColor

Cmn
Color

the container color of the list item when dragged.

Cmn
Color

the content color of the list item when dragged.

Cmn
Color

the color of the leading content of the list item when dragged.

Cmn
Color

the color of the overline content of the list item when dragged.

Cmn
Color

the color of the supporting content of the list item when dragged.

Cmn
Color

the color of the trailing content of the list item when dragged.

Cmn
Color

This property is deprecated. Renamed to contentColor

Cmn
Color

the color of the leading content of the list item.

Cmn
Color

This property is deprecated. Renamed to leadingContentColor

Cmn
Color

This property is deprecated. Renamed to overlineContentColor

Cmn
Color

the color of the overline content of the list item.

Cmn
Color

the container color of the list item when selected.

Cmn
Color

the content color of the list item when selected.

Cmn
Color

the color of the leading content of the list item when selected.

Cmn
Color

the color of the overline content of the list item when selected.

Cmn
Color

the color of the supporting content of the list item when selected.

Cmn
Color

the color of the trailing content of the list item when selected.

Cmn
Color

the color of the supporting content of the list item.

Cmn
Color

This property is deprecated. Renamed to supportingContentColor

Cmn
Color

the color of the trailing content of the list item.

Cmn
Color

This property is deprecated. Renamed to trailingContentColor

Cmn

Public constructors

ListItemColors

ListItemColors(
    containerColor: Color,
    headlineColor: Color,
    leadingIconColor: Color,
    overlineColor: Color,
    supportingTextColor: Color,
    trailingIconColor: Color,
    disabledHeadlineColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

ListItemColors

ListItemColors(
    containerColor: Color,
    contentColor: Color,
    leadingContentColor: Color,
    trailingContentColor: Color,
    overlineContentColor: Color,
    supportingContentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    disabledLeadingContentColor: Color,
    disabledTrailingContentColor: Color,
    disabledOverlineContentColor: Color,
    disabledSupportingContentColor: Color,
    selectedContainerColor: Color,
    selectedContentColor: Color,
    selectedLeadingContentColor: Color,
    selectedTrailingContentColor: Color,
    selectedOverlineContentColor: Color,
    selectedSupportingContentColor: Color,
    draggedContainerColor: Color,
    draggedContentColor: Color,
    draggedLeadingContentColor: Color,
    draggedTrailingContentColor: Color,
    draggedOverlineContentColor: Color,
    draggedSupportingContentColor: Color
)
Parameters
containerColor: Color

the container color of the list item.

contentColor: Color

the content color of the list item.

leadingContentColor: Color

the color of the leading content of the list item.

trailingContentColor: Color

the color of the trailing content of the list item.

overlineContentColor: Color

the color of the overline content of the list item.

supportingContentColor: Color

the color of the supporting content of the list item.

disabledContainerColor: Color

the container color of the list item when disabled.

disabledContentColor: Color

the content color of the list item when disabled.

disabledLeadingContentColor: Color

the color of the leading content of the list item when disabled.

disabledTrailingContentColor: Color

the color of the trailing content of the list item when disabled.

disabledOverlineContentColor: Color

the color of the overline content of the list item when disabled.

disabledSupportingContentColor: Color

the color of the supporting content of the list item when disabled.

selectedContainerColor: Color

the container color of the list item when selected.

selectedContentColor: Color

the content color of the list item when selected.

selectedLeadingContentColor: Color

the color of the leading content of the list item when selected.

selectedTrailingContentColor: Color

the color of the trailing content of the list item when selected.

selectedOverlineContentColor: Color

the color of the overline content of the list item when selected.

selectedSupportingContentColor: Color

the color of the supporting content of the list item when selected.

draggedContainerColor: Color

the container color of the list item when dragged.

draggedContentColor: Color

the content color of the list item when dragged.

draggedLeadingContentColor: Color

the color of the leading content of the list item when dragged.

draggedTrailingContentColor: Color

the color of the trailing content of the list item when dragged.

draggedOverlineContentColor: Color

the color of the overline content of the list item when dragged.

draggedSupportingContentColor: Color

the color of the supporting content of the list item when dragged.

Public functions

containerColor

fun containerColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

Returns the container color of the list item based on the current state.

Parameters
enabled: Boolean

whether the list item is enabled.

selected: Boolean

whether the list item is selected.

dragged: Boolean

whether the list item is dragged.

contentColor

fun contentColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

Returns the content color of the list item based on the current state.

Parameters
enabled: Boolean

whether the list item is enabled.

selected: Boolean

whether the list item is selected.

dragged: Boolean

whether the list item is dragged.

copy

fun copy(
    containerColor: Color = this.containerColor,
    headlineColor: Color = this.headlineColor,
    leadingIconColor: Color = this.leadingIconColor,
    overlineColor: Color = this.overlineColor,
    supportingTextColor: Color = this.supportingTextColor,
    trailingIconColor: Color = this.trailingIconColor,
    disabledHeadlineColor: Color = this.disabledHeadlineColor,
    disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
    disabledTrailingIconColor: Color = this.disabledTrailingIconColor
): ListItemColors

copy

fun copy(
    containerColor: Color = this.containerColor,
    contentColor: Color = this.contentColor,
    leadingContentColor: Color = this.leadingContentColor,
    trailingContentColor: Color = this.trailingContentColor,
    overlineContentColor: Color = this.overlineContentColor,
    supportingContentColor: Color = this.supportingContentColor,
    disabledContainerColor: Color = this.disabledContainerColor,
    disabledContentColor: Color = this.disabledContentColor,
    disabledLeadingContentColor: Color = this.disabledLeadingContentColor,
    disabledTrailingContentColor: Color = this.disabledTrailingContentColor,
    disabledOverlineContentColor: Color = this.disabledOverlineContentColor,
    disabledSupportingContentColor: Color = this.disabledSupportingContentColor,
    selectedContainerColor: Color = this.selectedContainerColor,
    selectedContentColor: Color = this.selectedContentColor,
    selectedLeadingContentColor: Color = this.selectedLeadingContentColor,
    selectedTrailingContentColor: Color = this.selectedTrailingContentColor,
    selectedOverlineContentColor: Color = this.selectedOverlineContentColor,
    selectedSupportingContentColor: Color = this.selectedSupportingContentColor,
    draggedContainerColor: Color = this.draggedContainerColor,
    draggedContentColor: Color = this.draggedContentColor,
    draggedLeadingContentColor: Color = this.draggedLeadingContentColor,
    draggedTrailingContentColor: Color = this.draggedTrailingContentColor,
    draggedOverlineContentColor: Color = this.draggedOverlineContentColor,
    draggedSupportingContentColor: Color = this.draggedSupportingContentColor
): ListItemColors

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

equals

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

hashCode

open fun hashCode(): Int

leadingContentColor

fun leadingContentColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

Returns the color of the leading content of the list item based on the current state.

Parameters
enabled: Boolean

whether the list item is enabled.

selected: Boolean

whether the list item is selected.

dragged: Boolean

whether the list item is dragged.

overlineContentColor

fun overlineContentColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

Returns the color of the overline content of the list item based on the current state.

Parameters
enabled: Boolean

whether the list item is enabled.

selected: Boolean

whether the list item is selected.

dragged: Boolean

whether the list item is dragged.

supportingContentColor

fun supportingContentColor(
    enabled: Boolean,
    selected: Boolean,
    dragged: Boolean
): Color

Returns the color of the supporting content of the list item based on the current state.

Parameters
enabled: Boolean

whether the list item is enabled.

selected: Boolean

whether the list item is selected.

dragged: Boolean

whether the list item is dragged.

trailingContentColor

fun trailingContentColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

Returns the color of the trailing content of the list item based on the current state.

Parameters
enabled: Boolean

whether the list item is enabled.

selected: Boolean

whether the list item is selected.

dragged: Boolean

whether the list item is dragged.

Public properties

containerColor

val containerColor: Color

the container color of the list item.

contentColor

val contentColor: Color

the content color of the list item.

disabledContainerColor

val disabledContainerColor: Color

the container color of the list item when disabled.

disabledContentColor

val disabledContentColor: Color

the content color of the list item when disabled.

disabledHeadlineColor

val disabledHeadlineColor: Color

disabledLeadingContentColor

val disabledLeadingContentColor: Color

the color of the leading content of the list item when disabled.

disabledLeadingIconColor

val disabledLeadingIconColor: Color

disabledOverlineContentColor

val disabledOverlineContentColor: Color

the color of the overline content of the list item when disabled.

disabledSupportingContentColor

val disabledSupportingContentColor: Color

the color of the supporting content of the list item when disabled.

disabledTrailingContentColor

val disabledTrailingContentColor: Color

the color of the trailing content of the list item when disabled.

disabledTrailingIconColor

val disabledTrailingIconColor: Color

draggedContainerColor

val draggedContainerColor: Color

the container color of the list item when dragged.

draggedContentColor

val draggedContentColor: Color

the content color of the list item when dragged.

draggedLeadingContentColor

val draggedLeadingContentColor: Color

the color of the leading content of the list item when dragged.

draggedOverlineContentColor

val draggedOverlineContentColor: Color

the color of the overline content of the list item when dragged.

draggedSupportingContentColor

val draggedSupportingContentColor: Color

the color of the supporting content of the list item when dragged.

draggedTrailingContentColor

val draggedTrailingContentColor: Color

the color of the trailing content of the list item when dragged.

headlineColor

val headlineColor: Color

leadingContentColor

val leadingContentColor: Color

the color of the leading content of the list item.

leadingIconColor

val leadingIconColor: Color

overlineColor

val overlineColor: Color

overlineContentColor

val overlineContentColor: Color

the color of the overline content of the list item.

selectedContainerColor

val selectedContainerColor: Color

the container color of the list item when selected.

selectedContentColor

val selectedContentColor: Color

the content color of the list item when selected.

selectedLeadingContentColor

val selectedLeadingContentColor: Color

the color of the leading content of the list item when selected.

selectedOverlineContentColor

val selectedOverlineContentColor: Color

the color of the overline content of the list item when selected.

selectedSupportingContentColor

val selectedSupportingContentColor: Color

the color of the supporting content of the list item when selected.

selectedTrailingContentColor

val selectedTrailingContentColor: Color

the color of the trailing content of the list item when selected.

supportingContentColor

val supportingContentColor: Color

the color of the supporting content of the list item.

supportingTextColor

val supportingTextColor: Color

trailingContentColor

val trailingContentColor: Color

the color of the trailing content of the list item.

trailingIconColor

val trailingIconColor: Color