🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

ListItemColors

Represents the colors of a list item in different states.

Source set: Common
public class ListItemColors(
    // default
    public val containerColor: Color,
    public val contentColor: Color,
    public val leadingContentColor: Color,
    public val trailingContentColor: Color,
    public val overlineContentColor: Color,
    public val supportingContentColor: Color,
    // disabled
    public val disabledContainerColor: Color,
    public val disabledContentColor: Color,
    public val disabledLeadingContentColor: Color,
    public val disabledTrailingContentColor: Color,
    public val disabledOverlineContentColor: Color,
    public val disabledSupportingContentColor: Color,
    // selected
    public val selectedContainerColor: Color,
    public val selectedContentColor: Color,
    public val selectedLeadingContentColor: Color,
    public val selectedTrailingContentColor: Color,
    public val selectedOverlineContentColor: Color,
    public val selectedSupportingContentColor: Color,
    // dragged
    public val draggedContainerColor: Color,
    public val draggedContentColor: Color,
    public val draggedLeadingContentColor: Color,
    public val draggedTrailingContentColor: Color,
    public val draggedOverlineContentColor: Color,
    public val draggedSupportingContentColor: Color,
)

Represents the colors of a list item in different states.

Parameters

containerColor the container color of the list item.
contentColor the content color of the list item.
leadingContentColor the color of the leading content of the list item.
trailingContentColor the color of the trailing content of the list item.
overlineContentColor the color of the overline content of the list item.
supportingContentColor the color of the supporting content of the list item.
disabledContainerColor the container color of the list item when disabled.
disabledContentColor the content color of the list item when disabled.
disabledLeadingContentColor the color of the leading content of the list item when disabled.
disabledTrailingContentColor the color of the trailing content of the list item when disabled.
disabledOverlineContentColor the color of the overline content of the list item when disabled.
disabledSupportingContentColor the color of the supporting content of the list item when disabled.
selectedContainerColor the container color of the list item when selected.
selectedContentColor the content color of the list item when selected.
selectedLeadingContentColor the color of the leading content of the list item when selected.
selectedTrailingContentColor the color of the trailing content of the list item when selected.
selectedOverlineContentColor the color of the overline content of the list item when selected.
selectedSupportingContentColor the color of the supporting content of the list item when selected.
draggedContainerColor the container color of the list item when dragged.
draggedContentColor the content color of the list item when dragged.
draggedLeadingContentColor the color of the leading content of the list item when dragged.
draggedTrailingContentColor the color of the trailing content of the list item when dragged.
draggedOverlineContentColor the color of the overline content of the list item when dragged.
draggedSupportingContentColor the color of the supporting content of the list item when dragged.

Properties

headlineColor

Source set: Common
@Deprecated("Renamed to contentColor", replaceWith = ReplaceWith("contentColor"))
    public val headlineColor: Color

leadingIconColor

Source set: Common
@Deprecated("Renamed to leadingContentColor", replaceWith = ReplaceWith("leadingContentColor"))
    public val leadingIconColor: Color

overlineColor

Source set: Common
@Deprecated(
        "Renamed to overlineContentColor",
        replaceWith = ReplaceWith("overlineContentColor"),
    )
    public val overlineColor: Color

supportingTextColor

Source set: Common
@Deprecated(
        "Renamed to supportingContentColor",
        replaceWith = ReplaceWith("supportingContentColor"),
    )
    public val supportingTextColor: Color

trailingIconColor

Source set: Common
@Deprecated(
        "Renamed to trailingContentColor",
        replaceWith = ReplaceWith("trailingContentColor"),
    )
    public val trailingIconColor: Color

disabledHeadlineColor

Source set: Common
@Deprecated(
        "Renamed to disabledContentColor",
        replaceWith = ReplaceWith("disabledContentColor"),
    )
    public val disabledHeadlineColor: Color

disabledLeadingIconColor

Source set: Common
@Deprecated(
        "Renamed to disabledLeadingContentColor",
        replaceWith = ReplaceWith("disabledLeadingContentColor"),
    )
    public val disabledLeadingIconColor: Color

disabledTrailingIconColor

Source set: Common
@Deprecated(
        "Renamed to disabledTrailingContentColor",
        replaceWith = ReplaceWith("disabledTrailingContentColor"),
    )
    public val disabledTrailingIconColor: Color

Functions

containerColor

Source set: Common
public fun containerColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

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

Parameters

enabled whether the list item is enabled.
selected whether the list item is selected.
dragged whether the list item is dragged.

contentColor

Source set: Common
public fun contentColor(enabled: Boolean, selected: Boolean, dragged: Boolean): Color

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

Parameters

enabled whether the list item is enabled.
selected whether the list item is selected.
dragged whether the list item is dragged.

leadingContentColor

Source set: Common
public 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 whether the list item is enabled.
selected whether the list item is selected.
dragged whether the list item is dragged.

trailingContentColor

Source set: Common
public 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 whether the list item is enabled.
selected whether the list item is selected.
dragged whether the list item is dragged.

overlineContentColor

Source set: Common
public 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 whether the list item is enabled.
selected whether the list item is selected.
dragged whether the list item is dragged.

supportingContentColor

Source set: Common
public 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 whether the list item is enabled.
selected whether the list item is selected.
dragged whether the list item is dragged.

copy

Source set: Common
public fun copy(
        // default
        containerColor: Color = this.containerColor,
        contentColor: Color = this.contentColor,
        leadingContentColor: Color = this.leadingContentColor,
        trailingContentColor: Color = this.trailingContentColor,
        overlineContentColor: Color = this.overlineContentColor,
        supportingContentColor: Color = this.supportingContentColor,
        // disabled
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledContentColor: Color = this.disabledContentColor,
        disabledLeadingContentColor: Color = this.disabledLeadingContentColor,
        disabledTrailingContentColor: Color = this.disabledTrailingContentColor,
        disabledOverlineContentColor: Color = this.disabledOverlineContentColor,
        disabledSupportingContentColor: Color = this.disabledSupportingContentColor,
        // selected
        selectedContainerColor: Color = this.selectedContainerColor,
        selectedContentColor: Color = this.selectedContentColor,
        selectedLeadingContentColor: Color = this.selectedLeadingContentColor,
        selectedTrailingContentColor: Color = this.selectedTrailingContentColor,
        selectedOverlineContentColor: Color = this.selectedOverlineContentColor,
        selectedSupportingContentColor: Color = this.selectedSupportingContentColor,
        // dragged
        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

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

copy

Source set: Common
@Deprecated("Use overload with parameters for selected and dragged colors")
    public 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

Content updated: