Stay organized with collections
Save and categorize content based on your preferences.
BackStackEntry
interface 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 |
Return the unique identifier for the entry.
|
abstract String! |
Get the name that was supplied to FragmentTransaction.addToBackStack(String) when creating this entry.
|
Public methods
getBreadCrumbShortTitle
abstract fun getBreadCrumbShortTitle(): CharSequence!
Deprecated: Deprecated in Java.
Return the short bread crumb title for the entry, or null if it does not have one.
getBreadCrumbShortTitleRes
abstract fun getBreadCrumbShortTitleRes(): Int
Deprecated: Deprecated in Java.
Return the short bread crumb title resource identifier for the entry, or 0 if it does not have one.
getBreadCrumbTitle
abstract fun getBreadCrumbTitle(): CharSequence!
Deprecated: Deprecated in Java.
Return the full bread crumb title for the entry, or null if it does not have one.
getBreadCrumbTitleRes
abstract fun getBreadCrumbTitleRes(): Int
Deprecated: Deprecated in Java.
Return the full bread crumb title resource identifier for the entry, or 0 if it does not have one.
getId
abstract fun getId(): Int
Deprecated: Deprecated in Java.
Return the unique identifier for the entry. This is the only representation of the entry that will persist across activity instances.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FragmentManager.BackStackEntry\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBackStackEntry\n==============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/FragmentManager.BackStackEntry \"View this page in Java\") \n\n```\ninterface BackStackEntry\n```\n\n|-------------------------------------------------|\n| [android.app.FragmentManager.BackStackEntry](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 28.**\n|\n| Use the [Support Library](https://developer.android.com/tools/extras/support-library.html) androidx.fragment.app.FragmentManager.BackStackEntry\n\nRepresentation of an entry on the fragment back stack, as created with [FragmentTransaction.addToBackStack()](/reference/kotlin/android/app/FragmentTransaction#addToBackStack(kotlin.String)). Entries can later be retrieved with [FragmentManager.getBackStackEntryAt()](/reference/kotlin/android/app/FragmentManager#getBackStackEntryAt(kotlin.Int)).\n\nNote that you should never hold on to a BackStackEntry object; the identifier as returned by [getId](#getId()) is the only thing that will be persisted across activity instances.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)! | [getBreadCrumbShortTitle](#getBreadCrumbShortTitle())`()` Return the short bread crumb title for the entry, or null if it does not have one. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getBreadCrumbShortTitleRes](#getBreadCrumbShortTitleRes())`()` Return the short bread crumb title resource identifier for the entry, or 0 if it does not have one. |\n| abstract [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)! | [getBreadCrumbTitle](#getBreadCrumbTitle())`()` Return the full bread crumb title for the entry, or null if it does not have one. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getBreadCrumbTitleRes](#getBreadCrumbTitleRes())`()` Return the full bread crumb title resource identifier for the entry, or 0 if it does not have one. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getId](#getId())`()` Return the unique identifier for the entry. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getName](#getName())`()` Get the name that was supplied to [FragmentTransaction.addToBackStack(String)](/reference/kotlin/android/app/FragmentTransaction#addToBackStack(kotlin.String)) when creating this entry. |\n\nPublic methods\n--------------\n\n### getBreadCrumbShortTitle\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getBreadCrumbShortTitle(): CharSequence!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturn the short bread crumb title for the entry, or null if it does not have one. \n\n### getBreadCrumbShortTitleRes\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getBreadCrumbShortTitleRes(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturn the short bread crumb title resource identifier for the entry, or 0 if it does not have one. \n\n### getBreadCrumbTitle\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getBreadCrumbTitle(): CharSequence!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturn the full bread crumb title for the entry, or null if it does not have one. \n\n### getBreadCrumbTitleRes\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getBreadCrumbTitleRes(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturn the full bread crumb title resource identifier for the entry, or 0 if it does not have one. \n\n### getId\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getId(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturn the unique identifier for the entry. This is the only representation of the entry that will persist across activity instances. \n\n### getName\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getName(): String!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nGet the name that was supplied to [FragmentTransaction.addToBackStack(String)](/reference/kotlin/android/app/FragmentTransaction#addToBackStack(kotlin.String)) when creating this entry."]]