NavigationBackStack

Manages a browser like backstack of items.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface BackStackListener<T>
Listener for changes to the navigation back stack.
Link copied to clipboard
A single item on the navigation backstack.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Adds a back stack listener to be notified of changes.
Link copied to clipboard
open fun addItem(@NonNull item: T)
Adds a new item depending on if we are currently going back or forward.
Link copied to clipboard
Removes all previously added back stack listeners.
Link copied to clipboard
open fun describeContents(): Int
Link copied to clipboard
open fun getBackItem(): T
Returns the current top back item, or null.
Link copied to clipboard
Returns the current top forward item, or null.
Link copied to clipboard
open fun goBack()
Goes back one step, or does nothing if the stack is already empty.
Link copied to clipboard
open fun goForward()
Goes forward one step, or does nothing if the stack is already empty.
Link copied to clipboard
Removes the back stack listener.
Link copied to clipboard
open fun replaceWith(@NonNull navigationHistory: NavigationBackStack<T>)
Replaces navigation back stack with another instance.
Link copied to clipboard
open fun resetForwardList()
Removes all forward navigation items.
Link copied to clipboard
open fun writeToParcel(dest: Parcel, flags: Int)