Entry maintains and stores the key and the content represented by that key. Entries should be created as part of a reference/androidx/navigation/NavDisplay.

Parameters
<T : Any>

the type of the key for this NavEntry

Summary

Public constructors

<T : Any> NavEntry(navEntry: NavEntry<T>, content: @Composable (T) -> Unit)

NavEntry constructor to create a NavEntry from another NavEntry

Cmn
<T : Any> NavEntry(
    key: T,
    contentKey: Any,
    metadata: Map<StringAny>,
    content: @Composable (T) -> Unit
)
Cmn

Public functions

Unit

Invokes the composable content of this NavEntry with the key that was provided when instantiating this NavEntry

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

Any

A unique, stable id that 1. uniquely identifies the content of this NavEntry 2. uniquely identifies any NavEntryDecorator states associated with this NavEntry.

Cmn
Map<StringAny>

provides information to the display

Cmn

Public constructors

<T : Any> NavEntry(navEntry: NavEntry<T>, content: @Composable (T) -> Unit)

NavEntry constructor to create a NavEntry from another NavEntry

Parameters
navEntry: NavEntry<T>

The entry that provides the key, contentKey, and metadata for the new entry.

content: @Composable (T) -> Unit

content for this entry to be displayed when this entry is active

<T : Any> NavEntry(
    key: T,
    contentKey: Any = defaultContentKey(key),
    metadata: Map<StringAny> = emptyMap(),
    content: @Composable (T) -> Unit
)
Parameters
<T : Any>

the type of the key for this NavEntry

key: T

key for this entry

contentKey: Any = defaultContentKey(key)

A unique, stable id that 1. uniquely identifies the content of this NavEntry 2. uniquely identifies any NavEntryDecorator states associated with this NavEntry.

NavEntries that share the same contentKey will be handled as sharing the same content and/or
[NavEntryDecorator] state. To maximize stability, it should be derived from the [key]. The
contentKey type must be saveable (i.e. on Android, it should be saveable via Android).
Defaults to [key].toString().
metadata: Map<StringAny> = emptyMap()

provides information to the display

content: @Composable (T) -> Unit

content for this entry to be displayed when this entry is active

Public functions

Content

@Composable
fun Content(): Unit

Invokes the composable content of this NavEntry with the key that was provided when instantiating this NavEntry

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

contentKey

val contentKeyAny

A unique, stable id that 1. uniquely identifies the content of this NavEntry 2. uniquely identifies any NavEntryDecorator states associated with this NavEntry.

NavEntries that share the same contentKey will be handled as sharing the same content and/or
[NavEntryDecorator] state. To maximize stability, it should be derived from the [key]. The
contentKey type must be saveable (i.e. on Android, it should be saveable via Android).
Defaults to [key].toString().

metadata

val metadataMap<StringAny>

provides information to the display