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

NavigationDrawerItemDefaults

public static class NavigationDrawerItemDefaults


Defaults used in NavigationDrawerItem.

Summary

Public fields

static @NonNull NavigationDrawerItemDefaults

Public methods

final @NonNull NavigationDrawerItemColors
@Composable
colors(
    @NonNull Color selectedContainerColor,
    @NonNull Color unselectedContainerColor,
    @NonNull Color selectedIconColor,
    @NonNull Color unselectedIconColor,
    @NonNull Color selectedTextColor,
    @NonNull Color unselectedTextColor,
    @NonNull Color selectedBadgeColor,
    @NonNull Color unselectedBadgeColor
)

Creates a NavigationDrawerItemColors with the provided colors according to the Material specification.

final @NonNull PaddingValues

Default external padding for a NavigationDrawerItem according to the Material specification.

Public fields

INSTANCE

public static @NonNull NavigationDrawerItemDefaults INSTANCE

Public methods

colors

@Composable
public final @NonNull NavigationDrawerItemColors colors(
    @NonNull Color selectedContainerColor,
    @NonNull Color unselectedContainerColor,
    @NonNull Color selectedIconColor,
    @NonNull Color unselectedIconColor,
    @NonNull Color selectedTextColor,
    @NonNull Color unselectedTextColor,
    @NonNull Color selectedBadgeColor,
    @NonNull Color unselectedBadgeColor
)

Creates a NavigationDrawerItemColors with the provided colors according to the Material specification.

Parameters
@NonNull Color selectedContainerColor

the color to use for the background of the item when selected

@NonNull Color unselectedContainerColor

the color to use for the background of the item when unselected

@NonNull Color selectedIconColor

the color to use for the icon when the item is selected.

@NonNull Color unselectedIconColor

the color to use for the icon when the item is unselected.

@NonNull Color selectedTextColor

the color to use for the text label when the item is selected.

@NonNull Color unselectedTextColor

the color to use for the text label when the item is unselected.

@NonNull Color selectedBadgeColor

the color to use for the badge when the item is selected.

@NonNull Color unselectedBadgeColor

the color to use for the badge when the item is unselected.

getItemPadding

public final @NonNull PaddingValues getItemPadding()

Default external padding for a NavigationDrawerItem according to the Material specification.