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

ListItemColors

public final class ListItemColors


Represents the container and content colors used in a list item in different states.

Summary

Public constructors

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

create an instance with arbitrary colors.

Public methods

final @NonNull Color

the container color of this list item when enabled.

final @NonNull Color

the content color of this list item when not enabled.

final @NonNull Color

the color of this list item's leading content when not enabled.

final @NonNull Color

the color of this list item's trailing content when not enabled.

final @NonNull Color

the headline text content color of this list item when enabled.

final @NonNull Color

the color of this list item's leading content when enabled.

final @NonNull Color

the overline text color of this list item

final @NonNull Color

the supporting text color of this list item

final @NonNull Color

the color of this list item's trailing content when enabled.

Public constructors

ListItemColors

public ListItemColors(
    @NonNull Color containerColor,
    @NonNull Color headlineColor,
    @NonNull Color leadingIconColor,
    @NonNull Color overlineColor,
    @NonNull Color supportingTextColor,
    @NonNull Color trailingIconColor,
    @NonNull Color disabledHeadlineColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor
)

create an instance with arbitrary colors. See ListItemDefaults.colors for the default colors used in a ListItem.

Parameters
@NonNull Color containerColor

the container color of this list item when enabled.

@NonNull Color headlineColor

the headline text content color of this list item when enabled.

@NonNull Color leadingIconColor

the color of this list item's leading content when enabled.

@NonNull Color overlineColor

the overline text color of this list item

@NonNull Color supportingTextColor

the supporting text color of this list item

@NonNull Color trailingIconColor

the color of this list item's trailing content when enabled.

@NonNull Color disabledHeadlineColor

the content color of this list item when not enabled.

@NonNull Color disabledLeadingIconColor

the color of this list item's leading content when not enabled.

@NonNull Color disabledTrailingIconColor

the color of this list item's trailing content when not enabled.

Public methods

getContainerColor

public final @NonNull Color getContainerColor()

the container color of this list item when enabled.

getDisabledHeadlineColor

public final @NonNull Color getDisabledHeadlineColor()

the content color of this list item when not enabled.

getDisabledLeadingIconColor

public final @NonNull Color getDisabledLeadingIconColor()

the color of this list item's leading content when not enabled.

getDisabledTrailingIconColor

public final @NonNull Color getDisabledTrailingIconColor()

the color of this list item's trailing content when not enabled.

getHeadlineColor

public final @NonNull Color getHeadlineColor()

the headline text content color of this list item when enabled.

getLeadingIconColor

public final @NonNull Color getLeadingIconColor()

the color of this list item's leading content when enabled.

getOverlineColor

public final @NonNull Color getOverlineColor()

the overline text color of this list item

getSupportingTextColor

public final @NonNull Color getSupportingTextColor()

the supporting text color of this list item

getTrailingIconColor

public final @NonNull Color getTrailingIconColor()

the color of this list item's trailing content when enabled.