NavAppComponentsDisplayManager

class NavAppComponentsDisplayManager : LifecycleOwner

A manager for the NavApp Components' representation within a display. This class provides shared instances for various frontends within the same display, allowing the global NavApp state to be managed in a centralized place without frontends having any dependency on each other.

When all frontends sharing a display manager are fully prepared, a single callback has to be provided to NavApp, signaling the start of its internal logic. This callback may only be given after all component containers are available. In TomTom Digital Cockpit's plugin architecture, each container lives in fragments owned by panels, which are asynchronously created by the system UI. To determine when all containers are ready, frontends must declare which containers to expect using expectContainerFor in Frontend.onCreate. The expected containers will be marked as available when the fragments registered through registerContainerFragment in Fragment.onCreate create their views.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun expectContainerFor(componentTag: ComponentTag)

Indicates that a container is expected to become available for ComponentTag, causing the display manager to wait for that before signalling to NavApp that it's ready to start.

Link copied to clipboard
open override fun getLifecycle(): LifecycleRegistry
Link copied to clipboard
fun registerContainerFragment(fragment: Fragment, vararg tagToContainerId: Pair<ComponentTag, Int>)

Registers the given fragment as a container for the NavApp components, allowing NavApp to retrieve containers based on the tagToContainerId mapping.

fun registerContainerFragment(    fragment: Fragment,     containerResolver: FragmentManagerReceiver.ContainerResolver,     componentTags: Set<ComponentTag>)

Registers the given fragment as a container for the NavApp components matching componentTags, allowing NavApp to retrieve containers using containerResolver.