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

ListItemDefaults

public static class ListItemDefaults


Contains the default values used by list items.

Summary

Public fields

static @NonNull ListItemDefaults

Public methods

final @NonNull ListItemColors
@Composable
colors(
    @NonNull Color containerColor,
    @NonNull Color headlineColor,
    @NonNull Color leadingIconColor,
    @NonNull Color overlineColor,
    @NonNull Color supportingColor,
    @NonNull Color trailingIconColor,
    @NonNull Color disabledHeadlineColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor
)

Creates a ListItemColors that represents the default container and content colors used in a ListItem.

final @NonNull Color

The container color of a list item

final @NonNull Color

The content color of a list item

final @NonNull Dp

The default elevation of a list item

final @NonNull Shape

The default shape of a list item

Public fields

INSTANCE

public static @NonNull ListItemDefaults INSTANCE

Public methods

colors

@Composable
public final @NonNull ListItemColors colors(
    @NonNull Color containerColor,
    @NonNull Color headlineColor,
    @NonNull Color leadingIconColor,
    @NonNull Color overlineColor,
    @NonNull Color supportingColor,
    @NonNull Color trailingIconColor,
    @NonNull Color disabledHeadlineColor,
    @NonNull Color disabledLeadingIconColor,
    @NonNull Color disabledTrailingIconColor
)

Creates a ListItemColors that represents the default container and content 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 supportingColor

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.

getContainerColor

@Composable
public final @NonNull Color getContainerColor()

The container color of a list item

getContentColor

@Composable
public final @NonNull Color getContentColor()

The content color of a list item

getElevation

public final @NonNull Dp getElevation()

The default elevation of a list item

getShape

@Composable
public final @NonNull Shape getShape()

The default shape of a list item