# FragmentManager.BackStackEntry

Artifact: [androidx.fragment:fragment](https://developer.android.com/jetpack/androidx/releases/fragment) [View Source](https://cs.android.com/search?q=file:androidx/fragment/app/FragmentManager.java+class:androidx.fragment.app.FragmentManager.BackStackEntry) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0)

*** ** * ** ***


```
public interface FragmentManager.BackStackEntry
```

<br />

*** ** * ** ***

Representation of an entry on the fragment back stack, as created with `https://developer.android.com/reference/androidx/fragment/app/FragmentTransaction#addToBackStack(java.lang.String)`. Entries can later be retrieved with `https://developer.android.com/reference/androidx/fragment/app/FragmentManager#getBackStackEntryAt(int)`.

Note that you should never hold on to a BackStackEntry object; the identifier as returned by `https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getId()` is the only thing that will be persisted across activity instances.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `[getBreadCrumbShortTitle](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbShortTitle())()` **This method is deprecated.** Store breadcrumb short titles separately from back stack entries. <br /> |
| `abstract @https://developer.android.com/reference/androidx/annotation/StringRes int` | `[getBreadCrumbShortTitleRes](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbShortTitleRes())()` **This method is deprecated.** Store breadcrumb short titles separately from back stack entries. <br /> |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `[getBreadCrumbTitle](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbTitle())()` **This method is deprecated.** Store breadcrumb titles separately from back stack entries. <br /> |
| `abstract @https://developer.android.com/reference/androidx/annotation/StringRes int` | `[getBreadCrumbTitleRes](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbTitleRes())()` **This method is deprecated.** Store breadcrumb titles separately from back stack entries. <br /> |
| `abstract int` | `https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getId()()` Return the unique identifier for the entry. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getName()()` Get the name that was supplied to `https://developer.android.com/reference/androidx/fragment/app/FragmentTransaction#addToBackStack(java.lang.String)` when creating this entry. |

## Public methods

### getBreadCrumbShortTitle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.2.0)

```
abstract @Nullable CharSequence [getBreadCrumbShortTitle](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbShortTitle())()
```

> [!CAUTION]
> **This method is 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

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.2.0)

```
abstract @StringRes int [getBreadCrumbShortTitleRes](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbShortTitleRes())()
```

> [!CAUTION]
> **This method is 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

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.2.0)

```
abstract @Nullable CharSequence [getBreadCrumbTitle](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbTitle())()
```

> [!CAUTION]
> **This method is 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

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.2.0)

```
abstract @StringRes int [getBreadCrumbTitleRes](https://developer.android.com/reference/androidx/fragment/app/FragmentManager.BackStackEntry#getBreadCrumbTitleRes())()
```

> [!CAUTION]
> **This method is 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

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0)

```
abstract int getId()
```

Return the unique identifier for the entry. This is the only representation of the entry that will persist across activity instances.

### getName

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0)

```
abstract @Nullable String getName()
```

Get the name that was supplied to `https://developer.android.com/reference/androidx/fragment/app/FragmentTransaction#addToBackStack(java.lang.String)` when creating this entry.