DrawerEntry

sealed interface DrawerEntry(source)

One row of the navigation drawer, or of the rail once it holds more than the tabs, or of the app bar's overflow menu.

The drawer lists what the tabs do not: destinations opened as pages and one-off actions such as sharing the app. A Spacer splits the list in two and pins everything after it to the bottom edge, the way the drawers of Google's apps keep Settings and Help at the foot.

Inheritors

Types

Link copied to clipboard
class Action(@StringRes val label: Int, val icon: ToolkitIcon, val onClick: (Context) -> Unit, @StringRes val shortLabel: Int? = null) : DrawerEntry

Runs onClick instead of navigating, for entries such as Share that leave the app.

Link copied to clipboard
class Link(val key: NavKey, @StringRes val label: Int, val icon: ToolkitIcon, @StringRes val shortLabel: Int? = null) : DrawerEntry
Link copied to clipboard
data object Spacer : DrawerEntry

Properties

Link copied to clipboard
abstract val shortLabel: Int?

A shorter label for the collapsed rail, where the full one would be cut off.