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
)
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 containerColorColor

the container color of the list item.

contentColor

val contentColorColor

the content color of the list item.

disabledContainerColor

val disabledContainerColorColor

the container color of the list item when disabled.

disabledContentColor

val disabledContentColorColor

the content color of the list item when disabled.

disabledHeadlineColor

val disabledHeadlineColorColor

disabledLeadingContentColor

val disabledLeadingContentColorColor

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

disabledLeadingIconColor

val disabledLeadingIconColorColor

disabledOverlineContentColor

val disabledOverlineContentColorColor

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

disabledSupportingContentColor

val disabledSupportingContentColorColor

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

disabledTrailingContentColor

val disabledTrailingContentColorColor

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

disabledTrailingIconColor

val disabledTrailingIconColorColor

draggedContainerColor

val draggedContainerColorColor

the container color of the list item when dragged.

draggedContentColor

val draggedContentColorColor

the content color of the list item when dragged.

draggedLeadingContentColor

val draggedLeadingContentColorColor

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

draggedOverlineContentColor

val draggedOverlineContentColorColor

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

draggedSupportingContentColor

val draggedSupportingContentColorColor

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

draggedTrailingContentColor

val draggedTrailingContentColorColor

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

headlineColor

val headlineColorColor

leadingContentColor

val leadingContentColorColor

the color of the leading content of the list item.

leadingIconColor

val leadingIconColorColor

overlineColor

val overlineColorColor

overlineContentColor

val overlineContentColorColor

the color of the overline content of the list item.

selectedContainerColor

val selectedContainerColorColor

the container color of the list item when selected.

selectedContentColor

val selectedContentColorColor

the content color of the list item when selected.

selectedLeadingContentColor

val selectedLeadingContentColorColor

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

selectedOverlineContentColor

val selectedOverlineContentColorColor

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

selectedSupportingContentColor

val selectedSupportingContentColorColor

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

selectedTrailingContentColor

val selectedTrailingContentColorColor

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

supportingContentColor

val supportingContentColorColor

the color of the supporting content of the list item.

supportingTextColor

val supportingTextColorColor

trailingContentColor

val trailingContentColorColor

the color of the trailing content of the list item.

trailingIconColor

val trailingIconColorColor