| java.lang.Object | |
| ↳ | com.pspdfkit.ui.navigation.NavigationBackStack<T> |
Manages a browser like backstack of items.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| interface | NavigationBackStack.BackStackListener<T> | Listener for changes to the navigation back stack. | |||||||||
| class | NavigationBackStack.NavigationItem<T> | A single item on the navigation backstack. | |||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static final Creator<NavigationBackStack> | CREATOR | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| NavigationBackStack() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
addBackStackListener(BackStackListener<T> backStackListener)
Adds a back stack listener to be notified of changes.
| ||||||||||
| void |
addItem(T item)
Adds a new item depending on if we are currently going back or forward.
| ||||||||||
| void |
clearBackStackListeners()
Removes all previously added back stack listeners.
| ||||||||||
| int | describeContents() | ||||||||||
| T |
getBackItem()
Returns the current top back item, or null.
| ||||||||||
| T |
getForwardItem()
Returns the current top forward item, or null.
| ||||||||||
| void |
goBack()
Goes back one step, or does nothing if the stack is already empty.
| ||||||||||
| void |
goForward()
Goes forward one step, or does nothing if the stack is already empty.
| ||||||||||
| void |
removeBackStackListener(BackStackListener<T> backStackListener)
Removes the back stack listener.
| ||||||||||
| void |
resetForwardList()
Removes all forward navigation items.
| ||||||||||
| void | writeToParcel(Parcel dest, int flags) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
| |||||||||||
Adds a back stack listener to be notified of changes.
If the listener has already been added previously, this method will be a no-op.
Adding null is not allowed, and will result in an exception.
| backStackListener | NavigationBackStack.BackStackListener that should be notified. Must be non-null. |
|---|
Adds a new item depending on if we are currently going back or forward.
| item | The item to add. |
|---|
Removes all previously added back stack listeners.
To remove just one listener use removeBackStackListener(NavigationBackStack.BackStackListener.
Upon calling this method no listeners will be notified of any changes.
Returns the current top back item, or null.
Returns the current top forward item, or null.
Goes back one step, or does nothing if the stack is already empty.
Goes forward one step, or does nothing if the stack is already empty.
Removes the back stack listener.
Upon calling this method the listener will no longer be notified of any changes.
If the listener has not been added, this method will be a no-op.
Adding null is not allowed,and will result in an exception.
| backStackListener | NavigationBackStack.BackStackListener that should be removed. Must be non-null. |
|---|
Removes all forward navigation items.