NavigablePanel

A panel that is navigable.

A panel is navigable if it satisfies three requirements. First, it should be placed in a stack. Second, it needs to be always-dismissible, so that a user can navigate to another panel lower in the stack by repeatingly dismissing the top elements. And third, it should be able to describe itself, so that a user can choose where to navigate to.

This panel satisfies the requirements by being of type GenericDismissiblePanel.Always, and requiring a NavigablePanelStackContext and providing the PanelDescriptor interface.

Parameters

frontendContext

An entry point for this GenericPanel to communicate with the rest of the system.

C

The type of PanelContext.

Inheritors

Constructors

Link copied to clipboard
constructor(frontendContext: FrontendContext)

Inherited properties

Link copied to clipboard

Represents the panel. The descriptor can for example be used by other panels to show breadcrumbs when this panel is part of a stack of panels.

Link copied to clipboard

The dismissal state of this panel.

Link copied to clipboard
Link copied to clipboard
val id: Long

Unique identifier of a GenericPanel. Each ID is an increment of the previously created panel's ID

Link copied to clipboard

true if the panel is currently attached.

Link copied to clipboard
open override val lifecycle: Lifecycle
Link copied to clipboard
open override val requestsRemoval: LiveData<Boolean>

Whether a panel wants to be removed from its frontend.

Link copied to clipboard
val tag: String

The tag to recognise this panel with. Useful in combination with fragment tags to detect which fragment belongs to which panel.

Link copied to clipboard

A destination that the information contained by this panel transitions to when this panel closes. By default it is null, indicating the information does not transition anywhere.

Link copied to clipboard

The source of the information contained by this panel when the information transitions from another panel to this one. By default it is null, indicating the information does not transition from any other particular panel.

Inherited functions

Link copied to clipboard

The fragment used when initially showing the panel. The fragment may be recreated by the system UI upon configuration changes.

Link copied to clipboard
override fun dismiss()

Dismisses the panel. After this requestsRemoval will be set to true, causing the panel to be removed from its frontend through onRemovedFromFrontend. This destroys the lifecycle and prevents the panel from being shown again.

Link copied to clipboard
operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getPanelContext(iviFragmentId: IviFragmentId): C

The PanelContext of an IviFragment identified by iviFragmentId.

Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
open override fun onAddedToFrontend()

Called when this panel is added to Frontend.panels, allowing it to be shown in the system UI.

Link copied to clipboard
fun onAttached(panelAttachment: PanelAttachment<C>)

Called when the panel is attached to the system UI.

Link copied to clipboard
fun onDetached(panelAttachment: PanelAttachment<C>)

Called when the panel has been detached from the system UI.

Link copied to clipboard

Called when the panel has been dismissed from the system UI, either through user interaction or other events. This causes requestsRemoval to be set to true. The panel will be removed from its frontend, causing onRemovedFromFrontend to be called. This destroys the lifecycle and prevents the panel from being shown again.

Link copied to clipboard

Called when the panel is being dismissed from the system UI, either through user interaction or other events. At this point the panel may still be visible due to the panel's exit animation.

Link copied to clipboard

Called when a panel is removed from a panel and can not be reused again, preventing it from being shown in the system UI.

Link copied to clipboard
open override fun toString(): String