BackStackEntry
interface BackStackEntry
androidx.fragment.app.FragmentManager.BackStackEntry |
Representation of an entry on the fragment back stack, as created with FragmentTransaction.addToBackStack()
. Entries can later be retrieved with FragmentManager.getBackStackEntryAt()
.
Note that you should never hold on to a BackStackEntry object; the identifier as returned by getId
is the only thing that will be persisted across activity instances.
Summary
Public methods |
|
---|---|
abstract CharSequence? |
Return the short bread crumb title for the entry, or null if it does not have one. |
abstract Int |
Return the short bread crumb title resource identifier for the entry, or 0 if it does not have one. |
abstract CharSequence? |
Return the full bread crumb title for the entry, or null if it does not have one. |
abstract Int |
Return the full bread crumb title resource identifier for the entry, or 0 if it does not have one. |
abstract Int |
getId() Return the unique identifier for the entry. |
abstract String? |
getName() Get the name that was supplied to |
Public methods
getBreadCrumbShortTitle
@Nullable abstract fungetBreadCrumbShortTitle(): CharSequence?
Deprecated: Store breadcrumb short titles separately from back stack entries. For example, by using an android:label
on a fragment in a navigation graph.
Return the short bread crumb title for the entry, or null if it does not have one.
getBreadCrumbShortTitleRes
@StringRes abstract fungetBreadCrumbShortTitleRes(): Int
Deprecated: Store breadcrumb short titles separately from back stack entries. For example, by using an android:label
on a fragment in a navigation graph.
Return the short bread crumb title resource identifier for the entry, or 0 if it does not have one.
getBreadCrumbTitle
@Nullable abstract fungetBreadCrumbTitle(): CharSequence?
Deprecated: Store breadcrumb titles separately from back stack entries. For example, * by using an android:label
on a fragment in a navigation graph.
Return the full bread crumb title for the entry, or null if it does not have one.
getBreadCrumbTitleRes
@StringRes abstract fungetBreadCrumbTitleRes(): Int
Deprecated: Store breadcrumb titles separately from back stack entries. For example, by using an android:label
on a fragment in a navigation graph.
Return the full bread crumb title resource identifier for the entry, or 0 if it does not have one.
getId
abstract fun getId(): Int
Return the unique identifier for the entry. This is the only representation of the entry that will persist across activity instances.
getName
@Nullable abstract fun getName(): String?
Get the name that was supplied to FragmentTransaction.addToBackStack(String)
when creating this entry.