# GuidedStepFragment

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

*** ** * ** ***


```
public class GuidedStepFragment extends Fragment
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) ||
|   | ↳ | [androidx.leanback.app.GuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/leanback/app/GuidedStepSupportFragment`

A GuidedStepFragment is used to guide the user through a decision or series of decisions. It is composed of a guidance view on the left and a view on the right containing a list of possible actions.

### Basic Usage

Clients of GuidedStepFragment must create a custom subclass to attach to their Activities. This custom subclass provides the information necessary to construct the user interface and respond to user actions. At a minimum, subclasses should override:

- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateGuidance(android.os.Bundle)`, to provide instructions to the user
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateActions(java.util.List<androidx.leanback.widget.GuidedAction>,android.os.Bundle)`, to provide a set of `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`s the user can take
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionClicked(androidx.leanback.widget.GuidedAction)`, to respond to those actions

Clients use following helper functions to add GuidedStepFragment to Activity or FragmentManager:

- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity,androidx.leanback.app.GuidedStepFragment,int)`, to be called during Activity onCreate, adds GuidedStepFragment as the first Fragment in activity.
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment)` or `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment,int)`, to add GuidedStepFragment on top of existing Fragments or replacing existing GuidedStepFragment when moving forward to next step.
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#finishGuidedStepFragments()` can either finish the activity or pop all GuidedStepFragment from stack.
- If app chooses not to use the helper function, it is the app's responsibility to call `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setUiStyle(int)` to select fragment transition and remember the stack entry where it need pops to.

### Theming and Stylists

GuidedStepFragment delegates its visual styling to classes called stylists. The `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` is responsible for the left guidance view, while the `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` is responsible for the right actions view. The stylists use theme attributes to derive values associated with the presentation, such as colors, animations, etc. Most simple visual aspects of GuidanceStylist and GuidedActionsStylist can be customized via theming; see their documentation for more information.

GuidedStepFragments must have access to an appropriate theme in order for the stylists to function properly. Specifically, the fragment must receive , or a theme whose parent is is set to that theme. Themes can be provided in one of three ways:

- The simplest way is to set the theme for the host Activity to the GuidedStep theme or a theme that derives from it.
- If the Activity already has a theme and setting its parent theme is inconvenient, the existing Activity theme can have an entry added for the attribute . If present, this theme will be used by GuidedStepFragment as an overlay to the Activity's theme.
- Finally, custom subclasses of GuidedStepFragment may provide a theme through the `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideTheme()` method. This can be useful if a subclass is used across multiple Activities.

If the theme is provided in multiple ways, the onProvideTheme override has priority, followed by the Activity's theme. (Themes whose parent theme is already set to the guided step theme do not need to set the guidedStepTheme attribute; if set, it will be ignored.)

If themes do not provide enough customizability, the stylists themselves may be subclassed and provided to the GuidedStepFragment through the `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateGuidanceStylist()` and `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateActionsStylist()` methods. The stylists have simple hooks so that subclasses may override layout files; subclasses may also have more complex logic to determine styling.

### Guided sequences

GuidedStepFragments can be grouped together to provide a guided sequence. GuidedStepFragments grouped as a sequence use custom animations provided by `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` (or subclasses) during transitions between steps. Clients should use `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment)` to place subsequent GuidedFragments onto the fragment stack so that custom animations are properly configured. (Custom animations are triggered automatically when the fragment stack is subsequently popped by any normal mechanism.)

*Note: Currently GuidedStepFragments grouped in this way must all be defined programmatically, rather than in XML. This restriction may be removed in the future.*

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` |   |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance` |   |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` |   |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` |   |

## Summary

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#EXTRA_UI_STYLE() = "uiStyle"` **This field is deprecated.** Deprecated in Java |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT() = 2` **This field is deprecated.** Deprecated in Java |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_DEFAULT() = 0` **This field is deprecated.** Same value as `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()`. <br /> |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE() = 1` **This field is deprecated.** Deprecated in Java |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE() = 0` **This field is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[GuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#GuidedStepFragment())()` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `static int` | `[add](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentManager.html fragmentManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment fragment )` **This method is deprecated.** Deprecated in Java |
| `static int` | `[add](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment,int))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentManager.html fragmentManager, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment fragment, int id )` **This method is deprecated.** Deprecated in Java |
| `static int` | `[addAsRoot](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity,androidx.leanback.app.GuidedStepFragment,int))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/Activity.html activity, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment fragment, int id )` **This method is deprecated.** Deprecated in Java |
| `void` | `[collapseAction](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#collapseAction(boolean))(boolean withTransition)` **This method is deprecated.** Deprecated in Java |
| `void` | `[collapseSubActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#collapseSubActions())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[expandAction](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#expandAction(androidx.leanback.widget.GuidedAction,boolean))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action, boolean withTransition)` **This method is deprecated.** Deprecated in Java |
| `void` | `[expandSubActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#expandSubActions(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` | `[findActionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findActionById(long))(long id)` **This method is deprecated.** Deprecated in Java |
| `int` | `[findActionPositionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findActionPositionById(long))(long id)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` | `[findButtonActionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findButtonActionById(long))(long id)` **This method is deprecated.** Deprecated in Java |
| `int` | `[findButtonActionPositionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findButtonActionPositionById(long))(long id)` **This method is deprecated.** Deprecated in Java |
| `void` | `[finishGuidedStepFragments](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#finishGuidedStepFragments())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | `[getActionItemView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getActionItemView(int))(int position)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction>` | `[getActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getActions())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | `[getButtonActionItemView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getButtonActionItemView(int))(int position)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction>` | `[getButtonActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getButtonActions())()` **This method is deprecated.** Deprecated in Java |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment` | `[getCurrentGuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getCurrentGuidedStepFragment(android.app.FragmentManager))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentManager.html fm)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` | `[getGuidanceStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getGuidanceStylist())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | `[getGuidedActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getGuidedActionsStylist())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | `[getGuidedButtonActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getGuidedButtonActionsStylist())()` **This method is deprecated.** Deprecated in Java |
| `int` | `[getSelectedActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getSelectedActionPosition())()` **This method is deprecated.** Deprecated in Java |
| `int` | `[getSelectedButtonActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getSelectedButtonActionPosition())()` **This method is deprecated.** Deprecated in Java |
| `int` | `[getUiStyle](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getUiStyle())()` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isExpanded](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isExpanded())()` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isFocusOutEndAllowed](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isFocusOutEndAllowed())()` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isFocusOutStartAllowed](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isFocusOutStartAllowed())()` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isSubActionsExpanded](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isSubActionsExpanded())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[notifyActionChanged](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#notifyActionChanged(int))(int position)` **This method is deprecated.** Deprecated in Java |
| `void` | `[notifyButtonActionChanged](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#notifyButtonActionChanged(int))(int position)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onCreate](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreate(android.os.Bundle))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onCreateActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateActions(java.util.List<androidx.leanback.widget.GuidedAction>,android.os.Bundle))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState )` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | `[onCreateActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateActionsStylist())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | `[onCreateBackgroundView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/LayoutInflater.html inflater, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/ViewGroup.html container, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState )` **This method is deprecated.** Deprecated in Java |
| `void` | `[onCreateButtonActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateButtonActions(java.util.List<androidx.leanback.widget.GuidedAction>,android.os.Bundle))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState )` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | `[onCreateButtonActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateButtonActionsStylist())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance` | `[onCreateGuidance](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateGuidance(android.os.Bundle))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` | `[onCreateGuidanceStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateGuidanceStylist())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | `[onCreateView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))( https://developer.android.com/reference/android/view/LayoutInflater.html inflater, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/ViewGroup.html container, https://developer.android.com/reference/android/os/Bundle.html savedInstanceState )` **This method is deprecated.** Deprecated in Java |
| `void` | `[onDestroyView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onDestroyView())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[onGuidedActionClicked](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionClicked(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onGuidedActionEditCanceled](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onGuidedActionEdited](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEdited(androidx.leanback.widget.GuidedAction))(https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Override `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(androidx.leanback.widget.GuidedAction)` and/or `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(androidx.leanback.widget.GuidedAction)`. <br /> |
| `long` | `[onGuidedActionEditedAndProceed](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onGuidedActionFocused](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionFocused(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `int` | `[onProvideTheme](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideTheme())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[onResume](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onResume())()` **This method is deprecated.** |
| `void` | `[onSaveInstanceState](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onSaveInstanceState(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html outState)` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[onSubGuidedActionClicked](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onSubGuidedActionClicked(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `void` | `[openInEditMode](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#openInEditMode(androidx.leanback.widget.GuidedAction))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` **This method is deprecated.** Deprecated in Java |
| `void` | `[popBackStackToGuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#popBackStackToGuidedStepFragment(java.lang.Class<?>,int))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> guidedStepFragmentClass, int flags )` **This method is deprecated.** Deprecated in Java |
| `void` | `[setActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActions(java.util.List<androidx.leanback.widget.GuidedAction>))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setActionsDiffCallback](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActionsDiffCallback(androidx.leanback.widget.DiffCallback<androidx.leanback.widget.GuidedAction>))( @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/DiffCallback<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> diffCallback )` **This method is deprecated.** Deprecated in Java |
| `void` | `[setButtonActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setButtonActions(java.util.List<androidx.leanback.widget.GuidedAction>))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setSelectedActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setSelectedActionPosition(int))(int position)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setSelectedButtonActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setSelectedButtonActionPosition(int))(int position)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setUiStyle](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setUiStyle(int))(int style)` **This method is deprecated.** Deprecated in Java |

| ### Protected methods |
|---|---|
| `void` | `[onAddSharedElementTransition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction,androidx.leanback.app.GuidedStepFragment))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentTransaction.html ft, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment disappearing )` **This method is deprecated.** Deprecated in Java |
| `void` | `[onProvideFragmentTransitions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideFragmentTransitions())()` **This method is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html) `static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND = 40`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE = 80`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE = 60`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL = 15`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW = 10`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE = 5`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN = 20`

**This field is deprecated.** Deprecated in Java

### Inherited methods

From [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) `void` `[dump](https://developer.android.com/reference/android/app/Fragment.html#dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]))(https://developer.android.com/reference/java/lang/String.html prefix, https://developer.android.com/reference/java/io/FileDescriptor.html fd, https://developer.android.com/reference/java/io/PrintWriter.html writer, String[] args)`

**This method is deprecated.**
`final boolean` `[equals](https://developer.android.com/reference/android/app/Fragment.html#equals(java.lang.Object))(https://developer.android.com/reference/java/lang/Object.html o)`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/Activity.html` `[getActivity](https://developer.android.com/reference/android/app/Fragment.html#getActivity())()`

**This method is deprecated.**
`boolean` `[getAllowEnterTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#getAllowEnterTransitionOverlap())()`

**This method is deprecated.**
`boolean` `[getAllowReturnTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#getAllowReturnTransitionOverlap())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/os/Bundle.html` `[getArguments](https://developer.android.com/reference/android/app/Fragment.html#getArguments())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/FragmentManager.html` `[getChildFragmentManager](https://developer.android.com/reference/android/app/Fragment.html#getChildFragmentManager())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/content/Context.html` `[getContext](https://developer.android.com/reference/android/app/Fragment.html#getContext())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#getEnterTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getExitTransition](https://developer.android.com/reference/android/app/Fragment.html#getExitTransition())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/FragmentManager.html` `[getFragmentManager](https://developer.android.com/reference/android/app/Fragment.html#getFragmentManager())()`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/Object.html` `[getHost](https://developer.android.com/reference/android/app/Fragment.html#getHost())()`

**This method is deprecated.**
`final int` `[getId](https://developer.android.com/reference/android/app/Fragment.html#getId())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/view/LayoutInflater.html` `[getLayoutInflater](https://developer.android.com/reference/android/app/Fragment.html#getLayoutInflater())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/app/LoaderManager.html` `[getLoaderManager](https://developer.android.com/reference/android/app/Fragment.html#getLoaderManager())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/Fragment.html` `[getParentFragment](https://developer.android.com/reference/android/app/Fragment.html#getParentFragment())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getReenterTransition](https://developer.android.com/reference/android/app/Fragment.html#getReenterTransition())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/content/res/Resources.html` `[getResources](https://developer.android.com/reference/android/app/Fragment.html#getResources())()`

**This method is deprecated.**
`final boolean` `[getRetainInstance](https://developer.android.com/reference/android/app/Fragment.html#getRetainInstance())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#getReturnTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getSharedElementEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#getSharedElementEnterTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getSharedElementReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#getSharedElementReturnTransition())()`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/String.html` `[getString](https://developer.android.com/reference/android/app/Fragment.html#getString(int))(int resId)`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/String.html` `[getTag](https://developer.android.com/reference/android/app/Fragment.html#getTag())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/Fragment.html` `[getTargetFragment](https://developer.android.com/reference/android/app/Fragment.html#getTargetFragment())()`

**This method is deprecated.**
`final int` `[getTargetRequestCode](https://developer.android.com/reference/android/app/Fragment.html#getTargetRequestCode())()`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/CharSequence.html` `[getText](https://developer.android.com/reference/android/app/Fragment.html#getText(int))(int resId)`

**This method is deprecated.**
`boolean` `[getUserVisibleHint](https://developer.android.com/reference/android/app/Fragment.html#getUserVisibleHint())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/view/View.html` `[getView](https://developer.android.com/reference/android/app/Fragment.html#getView())()`

**This method is deprecated.**
`final int` `[hashCode](https://developer.android.com/reference/android/app/Fragment.html#hashCode())()`

**This method is deprecated.**
`static https://developer.android.com/reference/android/app/Fragment.html` `[instantiate](https://developer.android.com/reference/android/app/Fragment.html#instantiate(android.content.Context, java.lang.String))(https://developer.android.com/reference/android/content/Context.html context, https://developer.android.com/reference/java/lang/String.html fname)`

**This method is deprecated.**
`final boolean` `[isAdded](https://developer.android.com/reference/android/app/Fragment.html#isAdded())()`

**This method is deprecated.**
`final boolean` `[isDetached](https://developer.android.com/reference/android/app/Fragment.html#isDetached())()`

**This method is deprecated.**
`final boolean` `[isHidden](https://developer.android.com/reference/android/app/Fragment.html#isHidden())()`

**This method is deprecated.**
`final boolean` `[isInLayout](https://developer.android.com/reference/android/app/Fragment.html#isInLayout())()`

**This method is deprecated.**
`final boolean` `[isRemoving](https://developer.android.com/reference/android/app/Fragment.html#isRemoving())()`

**This method is deprecated.**
`final boolean` `[isResumed](https://developer.android.com/reference/android/app/Fragment.html#isResumed())()`

**This method is deprecated.**
`final boolean` `[isStateSaved](https://developer.android.com/reference/android/app/Fragment.html#isStateSaved())()`

**This method is deprecated.**
`final boolean` `[isVisible](https://developer.android.com/reference/android/app/Fragment.html#isVisible())()`

**This method is deprecated.**
`void` `[onActivityCreated](https://developer.android.com/reference/android/app/Fragment.html#onActivityCreated(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[onActivityResult](https://developer.android.com/reference/android/app/Fragment.html#onActivityResult(int, int, android.content.Intent))(int requestCode, int resultCode, https://developer.android.com/reference/android/content/Intent.html data)`

**This method is deprecated.**
`void` `[onAttach](https://developer.android.com/reference/android/app/Fragment.html#onAttach(android.app.Activity))(https://developer.android.com/reference/android/app/Activity.html activity)`

**This method is deprecated.**
`void` `[onAttachFragment](https://developer.android.com/reference/android/app/Fragment.html#onAttachFragment(android.app.Fragment))(https://developer.android.com/reference/android/app/Fragment.html childFragment)`

**This method is deprecated.**
`void` `[onConfigurationChanged](https://developer.android.com/reference/android/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration))(https://developer.android.com/reference/android/content/res/Configuration.html newConfig)`

**This method is deprecated.**
`boolean` `[onContextItemSelected](https://developer.android.com/reference/android/app/Fragment.html#onContextItemSelected(android.view.MenuItem))(https://developer.android.com/reference/android/view/MenuItem.html item)`

**This method is deprecated.**
`https://developer.android.com/reference/android/animation/Animator.html` `[onCreateAnimator](https://developer.android.com/reference/android/app/Fragment.html#onCreateAnimator(int, boolean, int))(int transit, boolean enter, int nextAnim)`

**This method is deprecated.**
`void` `[onCreateContextMenu](https://developer.android.com/reference/android/app/Fragment.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo))(
https://developer.android.com/reference/android/view/ContextMenu.html menu,
https://developer.android.com/reference/android/view/View.html v,
https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html menuInfo
)`

**This method is deprecated.**
`void` `[onCreateOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater))(https://developer.android.com/reference/android/view/Menu.html menu, https://developer.android.com/reference/android/view/MenuInflater.html inflater)`

**This method is deprecated.**
`void` `[onDestroy](https://developer.android.com/reference/android/app/Fragment.html#onDestroy())()`

**This method is deprecated.**
`void` `[onDestroyOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onDestroyOptionsMenu())()`

**This method is deprecated.**
`void` `[onDetach](https://developer.android.com/reference/android/app/Fragment.html#onDetach())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/view/LayoutInflater.html` `[onGetLayoutInflater](https://developer.android.com/reference/android/app/Fragment.html#onGetLayoutInflater(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[onHiddenChanged](https://developer.android.com/reference/android/app/Fragment.html#onHiddenChanged(boolean))(boolean hidden)`

**This method is deprecated.**
`void` `[onInflate](https://developer.android.com/reference/android/app/Fragment.html#onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle))(
https://developer.android.com/reference/android/app/Activity.html activity,
https://developer.android.com/reference/android/util/AttributeSet.html attrs,
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState
)`

**This method is deprecated.**
`void` `[onLowMemory](https://developer.android.com/reference/android/app/Fragment.html#onLowMemory())()`

**This method is deprecated.**
`void` `[onMultiWindowModeChanged](https://developer.android.com/reference/android/app/Fragment.html#onMultiWindowModeChanged(boolean))(boolean isInMultiWindowMode)`

**This method is deprecated.**
`boolean` `[onOptionsItemSelected](https://developer.android.com/reference/android/app/Fragment.html#onOptionsItemSelected(android.view.MenuItem))(https://developer.android.com/reference/android/view/MenuItem.html item)`

**This method is deprecated.**
`void` `[onOptionsMenuClosed](https://developer.android.com/reference/android/app/Fragment.html#onOptionsMenuClosed(android.view.Menu))(https://developer.android.com/reference/android/view/Menu.html menu)`

**This method is deprecated.**
`void` `[onPause](https://developer.android.com/reference/android/app/Fragment.html#onPause())()`

**This method is deprecated.**
`void` `[onPictureInPictureModeChanged](https://developer.android.com/reference/android/app/Fragment.html#onPictureInPictureModeChanged(boolean))(boolean isInPictureInPictureMode)`

**This method is deprecated.**
`void` `[onPrepareOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onPrepareOptionsMenu(android.view.Menu))(https://developer.android.com/reference/android/view/Menu.html menu)`

**This method is deprecated.**
`void` `[onRequestPermissionsResult](https://developer.android.com/reference/android/app/Fragment.html#onRequestPermissionsResult(int, java.lang.String[], int[]))(
int requestCode,
String[] permissions,
int[] grantResults
)`

**This method is deprecated.**
`void` `[onStart](https://developer.android.com/reference/android/app/Fragment.html#onStart())()`

**This method is deprecated.**
`void` `[onStop](https://developer.android.com/reference/android/app/Fragment.html#onStop())()`

**This method is deprecated.**
`void` `[onTrimMemory](https://developer.android.com/reference/android/app/Fragment.html#onTrimMemory(int))(int level)`

**This method is deprecated.**
`void` `[onViewCreated](https://developer.android.com/reference/android/app/Fragment.html#onViewCreated(android.view.View, android.os.Bundle))(https://developer.android.com/reference/android/view/View.html view, https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[onViewStateRestored](https://developer.android.com/reference/android/app/Fragment.html#onViewStateRestored(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[postponeEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#postponeEnterTransition())()`

**This method is deprecated.**
`void` `[registerForContextMenu](https://developer.android.com/reference/android/app/Fragment.html#registerForContextMenu(android.view.View))(https://developer.android.com/reference/android/view/View.html view)`

**This method is deprecated.**
`final void` `[requestPermissions](https://developer.android.com/reference/android/app/Fragment.html#requestPermissions(java.lang.String[], int))(String[] permissions, int requestCode)`

**This method is deprecated.**
`void` `[setAllowEnterTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#setAllowEnterTransitionOverlap(boolean))(boolean allow)`

**This method is deprecated.**
`void` `[setAllowReturnTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#setAllowReturnTransitionOverlap(boolean))(boolean allow)`

**This method is deprecated.**
`void` `[setArguments](https://developer.android.com/reference/android/app/Fragment.html#setArguments(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html args)`

**This method is deprecated.**
`void` `[setEnterSharedElementCallback](https://developer.android.com/reference/android/app/Fragment.html#setEnterSharedElementCallback(android.app.SharedElementCallback))(https://developer.android.com/reference/android/app/SharedElementCallback.html callback)`

**This method is deprecated.**
`void` `[setEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#setEnterTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setExitSharedElementCallback](https://developer.android.com/reference/android/app/Fragment.html#setExitSharedElementCallback(android.app.SharedElementCallback))(https://developer.android.com/reference/android/app/SharedElementCallback.html callback)`

**This method is deprecated.**
`void` `[setExitTransition](https://developer.android.com/reference/android/app/Fragment.html#setExitTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setHasOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#setHasOptionsMenu(boolean))(boolean hasMenu)`

**This method is deprecated.**
`void` `[setInitialSavedState](https://developer.android.com/reference/android/app/Fragment.html#setInitialSavedState(android.app.Fragment.SavedState))(https://developer.android.com/reference/android/app/Fragment.SavedState.html state)`

**This method is deprecated.**
`void` `[setMenuVisibility](https://developer.android.com/reference/android/app/Fragment.html#setMenuVisibility(boolean))(boolean menuVisible)`

**This method is deprecated.**
`void` `[setReenterTransition](https://developer.android.com/reference/android/app/Fragment.html#setReenterTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setRetainInstance](https://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean))(boolean retain)`

**This method is deprecated.**
`void` `[setReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#setReturnTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setSharedElementEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#setSharedElementEnterTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setSharedElementReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#setSharedElementReturnTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setTargetFragment](https://developer.android.com/reference/android/app/Fragment.html#setTargetFragment(android.app.Fragment, int))(https://developer.android.com/reference/android/app/Fragment.html fragment, int requestCode)`

**This method is deprecated.**
`void` `[setUserVisibleHint](https://developer.android.com/reference/android/app/Fragment.html#setUserVisibleHint(boolean))(boolean isVisibleToUser)`

**This method is deprecated.**
`boolean` `[shouldShowRequestPermissionRationale](https://developer.android.com/reference/android/app/Fragment.html#shouldShowRequestPermissionRationale(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission)`

**This method is deprecated.**
`void` `[startActivity](https://developer.android.com/reference/android/app/Fragment.html#startActivity(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.**
`void` `[startActivityForResult](https://developer.android.com/reference/android/app/Fragment.html#startActivityForResult(android.content.Intent, int))(https://developer.android.com/reference/android/content/Intent.html intent, int requestCode)`

**This method is deprecated.**
`void` `[startIntentSenderForResult](https://developer.android.com/reference/android/app/Fragment.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle))(
https://developer.android.com/reference/android/content/IntentSender.html intent,
int requestCode,
https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags,
https://developer.android.com/reference/android/os/Bundle.html options
)`

**This method is deprecated.**
`void` `[startPostponedEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#startPostponedEnterTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/java/lang/String.html` `[toString](https://developer.android.com/reference/android/app/Fragment.html#toString())()`

**This method is deprecated.**
`void` `[unregisterForContextMenu](https://developer.android.com/reference/android/app/Fragment.html#unregisterForContextMenu(android.view.View))(https://developer.android.com/reference/android/view/View.html view)`

**This method is deprecated.**

## Constants

### EXTRA_UI_STYLE

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

```
public static final String EXTRA_UI_STYLE = "uiStyle"
```

> [!CAUTION]
> **This field is deprecated.**   
> Deprecated in Java

Fragment argument name for UI style. The argument value is persisted in fragment state and used to select fragment transition. The value is initially `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()` and might be changed in one of the three helper functions:

- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity,androidx.leanback.app.GuidedStepFragment,int)` sets to `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT()`
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment)` or `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment,int)` sets it to `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()` if there is already a GuidedStepFragment on stack.
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#finishGuidedStepFragments()` changes current GuidedStepFragment to `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()` for the non activity case. This is a special case that changes the transition settings after fragment has been created, in order to force current GuidedStepFragment run a return transition of `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`

Argument value can be either:

- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()`
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT()`

### UI_STYLE_ACTIVITY_ROOT

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

```
public static final int UI_STYLE_ACTIVITY_ROOT = 2
```

> [!CAUTION]
> **This field is deprecated.**   
> Deprecated in Java

One possible value of argument `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#EXTRA_UI_STYLE()`. This is the case that we show first GuidedStepFragment in a separate activity. The default behavior of this style:

- Enter transition is assigned null (will rely on activity transition), exit transition is same as `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`. Note: Changing exit transition by UI style is not working because fragment transition asks for exit transition before UI style is restored in Fragment.onCreate().

### UI_STYLE_DEFAULT

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

```
public static final int UI_STYLE_DEFAULT = 0
```

> [!CAUTION]
> **This field is deprecated.**   
>
> Same value as `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()`.

### UI_STYLE_ENTRANCE

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

```
public static final int UI_STYLE_ENTRANCE = 1
```

> [!CAUTION]
> **This field is deprecated.**   
> Deprecated in Java

Default value for argument `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#EXTRA_UI_STYLE()`. The default value is assigned in GuidedStepFragment constructor. This is the case that we show GuidedStepFragment on top of other content. The default behavior of this style:

- Enter transition slides in from two sides, exit transition slide out to START(left). Background will be faded in. Note: Changing exit transition by UI style is not working because fragment transition asks for exit transition before UI style is restored in Fragment .onCreate().

When popping multiple GuidedStepFragment, `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#finishGuidedStepFragments()` also changes the top GuidedStepFragment to UI_STYLE_ENTRANCE in order to run the return transition (reverse of enter transition) of UI_STYLE_ENTRANCE.

### UI_STYLE_REPLACE

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

```
public static final int UI_STYLE_REPLACE = 0
```

> [!CAUTION]
> **This field is deprecated.**   
> Deprecated in Java

This is the case that we use GuidedStepFragment to replace another existing GuidedStepFragment when moving forward to next step. Default behavior of this style is:

- Enter transition slides in from END(right), exit transition same as `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`.

## Public constructors

### GuidedStepFragment

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

```
public [GuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#GuidedStepFragment())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

## Public methods

### add

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

```
public static int [add](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment))(
    @NonNull FragmentManager fragmentManager,
    @NonNull GuidedStepFragment fragment
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Adds the specified GuidedStepFragment to the fragment stack, replacing any existing GuidedStepFragments in the stack, and configuring the fragment-to-fragment custom transitions. A backstack entry is added, so the fragment will be dismissed when BACK key is pressed.

- If current fragment on stack is GuidedStepFragment: assign `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()`
- If current fragment on stack is not GuidedStepFragment: assign `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`

Note: currently fragments added using this method must be created programmatically rather than via XML.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentManager.html fragmentManager` | The FragmentManager to be used in the transaction. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment fragment` | The GuidedStepFragment to be inserted into the fragment stack. |

| Returns |
|---|---|
| `int` | The ID returned by the call FragmentTransaction.commit. |

### add

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

```
public static int [add](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment,int))(
    @NonNull FragmentManager fragmentManager,
    @NonNull GuidedStepFragment fragment,
    int id
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Adds the specified GuidedStepFragment to the fragment stack, replacing any existing GuidedStepFragments in the stack, and configuring the fragment-to-fragment custom transitions. A backstack entry is added, so the fragment will be dismissed when BACK key is pressed.

- If current fragment on stack is GuidedStepFragment: assign `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()` and `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction,androidx.leanback.app.GuidedStepFragment)` will be called to perform shared element transition between GuidedStepFragments.
- If current fragment on stack is not GuidedStepFragment: assign `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`

Note: currently fragments added using this method must be created programmatically rather than via XML.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentManager.html fragmentManager` | The FragmentManager to be used in the transaction. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment fragment` | The GuidedStepFragment to be inserted into the fragment stack. |
| `int id` | The id of container to add GuidedStepFragment, can be android.R.id.content. |

| Returns |
|---|---|
| `int` | The ID returned by the call FragmentTransaction.commit. |

### addAsRoot

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

```
public static int [addAsRoot](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity,androidx.leanback.app.GuidedStepFragment,int))(
    @NonNull Activity activity,
    @NonNull GuidedStepFragment fragment,
    int id
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Adds the specified GuidedStepFragment as content of Activity; no backstack entry is added so the activity will be dismissed when BACK key is pressed. The method is typically called in Activity.onCreate() when savedInstanceState is null. When savedInstanceState is not null, the Activity is being restored, do not call addAsRoot() to duplicate the Fragment restored by FragmentManager. `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT()` is assigned. Note: currently fragments added using this method must be created programmatically rather than via XML.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/Activity.html activity` | The Activity to be used to insert GuidedstepFragment. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment fragment` | The GuidedStepFragment to be inserted into the fragment stack. |
| `int id` | The id of container to add GuidedStepFragment, can be android.R.id.content. |

| Returns |
|---|---|
| `int` | The ID returned by the call FragmentTransaction.commit, or -1 there is already GuidedStepFragment. |

### collapseAction

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

```
public void [collapseAction](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#collapseAction(boolean))(boolean withTransition)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Collapse action which either has a sub actions list or action with `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#hasEditableActivatorView()` is true.

| Parameters |
|---|---|
| `boolean withTransition` | True to run transition animation, false otherwise. |

### collapseSubActions

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

```
public void [collapseSubActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#collapseSubActions())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Collapse sub actions list.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#getSubActions()` |   |

### expandAction

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

```
public void [expandAction](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#expandAction(androidx.leanback.widget.GuidedAction,boolean))(@NonNull GuidedAction action, boolean withTransition)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Expand a given action with sub actions list or `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#hasEditableActivatorView()` is true. The method must be called after `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)` creates fragment view.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | GuidedAction to expand. |
| `boolean withTransition` | True to run transition animation, false otherwise. |

### expandSubActions

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

```
public void [expandSubActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#expandSubActions(androidx.leanback.widget.GuidedAction))(@NonNull GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Expand a given action's sub actions list.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | GuidedAction to expand. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#expandAction(androidx.leanback.widget.GuidedAction,boolean)` |   |

### findActionById

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

```
public @Nullable GuidedAction [findActionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findActionById(long))(long id)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Find GuidedAction by Id.

| Parameters |
|---|---|
| `long id` | Id of the action to search. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` | GuidedAction object or null if not found. |

### findActionPositionById

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

```
public int [findActionPositionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findActionPositionById(long))(long id)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Find GuidedAction position in array by Id.

| Parameters |
|---|---|
| `long id` | Id of the action to search. |

| Returns |
|---|---|
| `int` | position of GuidedAction object in array or -1 if not found. |

### findButtonActionById

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

```
public @Nullable GuidedAction [findButtonActionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findButtonActionById(long))(long id)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Find button GuidedAction by Id.

| Parameters |
|---|---|
| `long id` | Id of the button action to search. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` | GuidedAction object or null if not found. |

### findButtonActionPositionById

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

```
public int [findButtonActionPositionById](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#findButtonActionPositionById(long))(long id)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Find button GuidedAction position in array by Id.

| Parameters |
|---|---|
| `long id` | Id of the button action to search. |

| Returns |
|---|---|
| `int` | position of GuidedAction object in array or -1 if not found. |

### finishGuidedStepFragments

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

```
public void [finishGuidedStepFragments](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#finishGuidedStepFragments())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Convenient method to close GuidedStepFragments on top of other content or finish Activity if GuidedStepFragments were started in a separate activity. Pops all stack entries including `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`; if `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()` is not found, finish the activity. Note that this method must be paired with `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment,int)` which sets up the stack entry name for finding which fragment we need to pop back to.

### getActionItemView

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

```
public @Nullable View [getActionItemView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getActionItemView(int))(int position)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the view corresponding to the action at the indicated position in the list of actions for this fragment.

| Parameters |
|---|---|
| `int position` | The integer position of the action of interest. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | The View corresponding to the action at the indicated position, or null if that action is not currently onscreen. |

### getActions

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

```
public @NonNull List<GuidedAction> [getActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getActions())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the list of GuidedActions that the user may take in this fragment.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction>` | The list of GuidedActions for this fragment. |

### getButtonActionItemView

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

```
public @Nullable View [getButtonActionItemView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getButtonActionItemView(int))(int position)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the view corresponding to the button action at the indicated position in the list of actions for this fragment.

| Parameters |
|---|---|
| `int position` | The integer position of the button action of interest. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | The View corresponding to the button action at the indicated position, or null if that action is not currently onscreen. |

### getButtonActions

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

```
public @NonNull List<GuidedAction> [getButtonActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getButtonActions())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the list of button GuidedActions that the user may take in this fragment.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction>` | The list of button GuidedActions for this fragment. |

### getCurrentGuidedStepFragment

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

```
public static @Nullable GuidedStepFragment [getCurrentGuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getCurrentGuidedStepFragment(android.app.FragmentManager))(@NonNull FragmentManager fm)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the current GuidedStepFragment on the fragment transaction stack.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment` | The current GuidedStepFragment, if any, on the fragment transaction stack. |

### getGuidanceStylist

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

```
public @NonNull GuidanceStylist [getGuidanceStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getGuidanceStylist())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the GuidanceStylist that displays guidance information for the user.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` | The GuidanceStylist for this fragment. |

### getGuidedActionsStylist

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

```
public @NonNull GuidedActionsStylist [getGuidedActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getGuidedActionsStylist())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the GuidedActionsStylist that displays the actions the user may take.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | The GuidedActionsStylist for this fragment. |

### getGuidedButtonActionsStylist

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

```
public @NonNull GuidedActionsStylist [getGuidedButtonActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getGuidedButtonActionsStylist())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the GuidedActionsStylist that displays the button actions the user may take.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | The GuidedActionsStylist for this fragment. |

### getSelectedActionPosition

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

```
public int [getSelectedActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getSelectedActionPosition())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the position if the currently selected GuidedAction.

| Returns |
|---|---|
| `int` | position The integer position of the currently selected action. |

### getSelectedButtonActionPosition

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

```
public int [getSelectedButtonActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getSelectedButtonActionPosition())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the position if the currently selected button GuidedAction.

| Returns |
|---|---|
| `int` | position The integer position of the currently selected button action. |

### getUiStyle

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

```
public int [getUiStyle](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getUiStyle())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Read UI style from fragment arguments. Default value is `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()` when fragment is first initialized. UI style is used to choose different fragment transition animations and determine if this is the first GuidedStepFragment on backstack.

| Returns |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT()``https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()` or `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideFragmentTransitions()` |   |

### isExpanded

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

```
public boolean [isExpanded](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isExpanded())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

| Returns |
|---|---|
| `boolean` | True if is current expanded including subactions list or action with `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#hasEditableActivatorView()` is true. |

### isFocusOutEndAllowed

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

```
public boolean [isFocusOutEndAllowed](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isFocusOutEndAllowed())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns true if allows focus out of end edge of GuidedStepFragment, false otherwise. Default value is false, the reason is to disable FocusFinder to find focusable views beneath content of GuidedStepFragment. Subclass may override.

| Returns |
|---|---|
| `boolean` | True if allows focus out of end edge of GuidedStepFragment. |

### isFocusOutStartAllowed

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

```
public boolean [isFocusOutStartAllowed](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isFocusOutStartAllowed())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns true if allows focus out of start edge of GuidedStepFragment, false otherwise. Default value is false, the reason is to disable FocusFinder to find focusable views beneath content of GuidedStepFragment. Subclass may override.

| Returns |
|---|---|
| `boolean` | True if allows focus out of start edge of GuidedStepFragment. |

### isSubActionsExpanded

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

```
public boolean [isSubActionsExpanded](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#isSubActionsExpanded())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

| Returns |
|---|---|
| `boolean` | True if the sub actions list is expanded, false otherwise. |

### notifyActionChanged

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

```
public void [notifyActionChanged](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#notifyActionChanged(int))(int position)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Notify an action has changed and update its UI.

| Parameters |
|---|---|
| `int position` | Position of the GuidedAction in array. |

### notifyButtonActionChanged

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

```
public void [notifyButtonActionChanged](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#notifyButtonActionChanged(int))(int position)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Notify an button action has changed and update its UI.

| Parameters |
|---|---|
| `int position` | Position of the button GuidedAction in array. |

### onCreate

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

```
public void [onCreate](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreate(android.os.Bundle))(@Nullable Bundle savedInstanceState)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onCreateActions

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

```
public void [onCreateActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateActions(java.util.List<androidx.leanback.widget.GuidedAction>,android.os.Bundle))(
    @NonNull List<GuidedAction> actions,
    @Nullable Bundle savedInstanceState
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Fills out the set of actions available to the user. This hook is called during `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreate(android.os.Bundle)`. The default leaves the list of actions empty; subclasses should override.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions` | A non-null, empty list ready to be populated. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState` | The saved instance state from onCreate. |

### onCreateActionsStylist

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

```
public @NonNull GuidedActionsStylist [onCreateActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateActionsStylist())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Creates the presenter used to style the guided actions panel. The default implementation returns a basic GuidedActionsStylist.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | The GuidedActionsStylist used in this fragment. |

### onCreateBackgroundView

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

```
public @Nullable View [onCreateBackgroundView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
    @NonNull LayoutInflater inflater,
    @Nullable ViewGroup container,
    @Nullable Bundle savedInstanceState
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called by onCreateView to inflate background view. Default implementation loads view from which holds a reference to guidedStepBackground.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/LayoutInflater.html inflater` | LayoutInflater to load background view. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/ViewGroup.html container` | Parent view of background view. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState` |   |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | Created background view or null if no background. |

### onCreateButtonActions

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

```
public void [onCreateButtonActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateButtonActions(java.util.List<androidx.leanback.widget.GuidedAction>,android.os.Bundle))(
    @NonNull List<GuidedAction> actions,
    @Nullable Bundle savedInstanceState
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Fills out the set of actions shown at right available to the user. This hook is called during `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreate(android.os.Bundle)`. The default leaves the list of actions empty; subclasses may override.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions` | A non-null, empty list ready to be populated. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState` | The saved instance state from onCreate. |

### onCreateButtonActionsStylist

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

```
public @NonNull GuidedActionsStylist [onCreateButtonActionsStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateButtonActionsStylist())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Creates the presenter used to style a sided actions panel for button only. The default implementation returns a basic GuidedActionsStylist.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` | The GuidedActionsStylist used in this fragment. |

### onCreateGuidance

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

```
public @NonNull GuidanceStylist.Guidance [onCreateGuidance](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateGuidance(android.os.Bundle))(@Nullable Bundle savedInstanceState)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the information required to provide guidance to the user. This hook is called during `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`. May be overridden to return a custom subclass of `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance` for use in a subclass of `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist`. The default returns a Guidance object with empty fields; subclasses should override.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState` | The saved instance state from onCreateView. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist.Guidance` | The Guidance object representing the information used to guide the user. |

### onCreateGuidanceStylist

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

```
public @NonNull GuidanceStylist [onCreateGuidanceStylist](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateGuidanceStylist())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Creates the presenter used to style the guidance panel. The default implementation returns a basic GuidanceStylist.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` | The GuidanceStylist used in this fragment. |

### onCreateView

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

```
public @Nullable View [onCreateView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
    LayoutInflater inflater,
    @Nullable ViewGroup container,
    Bundle savedInstanceState
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onDestroyView

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

```
public void [onDestroyView](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onDestroyView())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onGuidedActionClicked

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

```
public void [onGuidedActionClicked](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionClicked(androidx.leanback.widget.GuidedAction))(@NonNull GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Callback invoked when an action is taken by the user. Subclasses should override in order to act on the user's decisions.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The chosen action. |

### onGuidedActionEditCanceled

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

```
public void [onGuidedActionEditCanceled](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(androidx.leanback.widget.GuidedAction))(@NonNull GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Callback invoked when an action has been canceled editing, for example when user closes IME window by BACK key. Default implementation calls deprecated method `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEdited(androidx.leanback.widget.GuidedAction)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The action which has been canceled editing. |

### onGuidedActionEdited

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

```
public void [onGuidedActionEdited](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEdited(androidx.leanback.widget.GuidedAction))(GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Override `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(androidx.leanback.widget.GuidedAction)` and/or `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(androidx.leanback.widget.GuidedAction)`.

Callback invoked when an action's title or description has been edited, this happens either when user clicks confirm button in IME or user closes IME window by BACK key.

### onGuidedActionEditedAndProceed

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

```
public long [onGuidedActionEditedAndProceed](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(androidx.leanback.widget.GuidedAction))(@NonNull GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Callback invoked when an action has been edited, for example when user clicks confirm button in IME window. Default implementation calls deprecated method `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionEdited(androidx.leanback.widget.GuidedAction)` and returns `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_NEXT()`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The action that has been edited. |

| Returns |
|---|---|
| `long` | ID of the action will be focused or `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_NEXT()`, `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_CURRENT()`. |

### onGuidedActionFocused

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

```
public void [onGuidedActionFocused](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onGuidedActionFocused(androidx.leanback.widget.GuidedAction))(@NonNull GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Callback invoked when an action is focused (made to be the current selection) by the user.

### onProvideTheme

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

```
public int [onProvideTheme](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideTheme())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the theme used for styling the fragment. The default returns -1, indicating that the host Activity's theme should be used.

| Returns |
|---|---|
| `int` | The theme resource ID of the theme to use in this fragment, or -1 to use the host Activity's theme. |

### onResume

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

```
public void [onResume](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onResume())()
```

> [!CAUTION]
> **This method is deprecated.**   

### onSaveInstanceState

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

```
public void [onSaveInstanceState](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onSaveInstanceState(android.os.Bundle))(Bundle outState)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onSubGuidedActionClicked

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

```
public boolean [onSubGuidedActionClicked](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onSubGuidedActionClicked(androidx.leanback.widget.GuidedAction))(@NonNull GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Callback invoked when an action in sub actions is taken by the user. Subclasses should override in order to act on the user's decisions. Default return value is true to close the sub actions list.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The chosen action. |

| Returns |
|---|---|
| `boolean` | true to collapse the sub actions list, false to keep it expanded. |

### openInEditMode

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

```
public void [openInEditMode](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#openInEditMode(androidx.leanback.widget.GuidedAction))(@Nullable GuidedAction action)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Opens the provided action in edit mode and raises ime. This can be used to programmatically skip the extra click required to go into edit mode. This method can be invoked in `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle)`.

### popBackStackToGuidedStepFragment

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

```
public void [popBackStackToGuidedStepFragment](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#popBackStackToGuidedStepFragment(java.lang.Class<?>,int))(
    @NonNull Class<@NonNull ?> guidedStepFragmentClass,
    int flags
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Convenient method to pop to fragment with Given class.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> guidedStepFragmentClass` | Name of the Class of GuidedStepFragment to pop to. |
| `int flags` | Either 0 or `https://developer.android.com/reference/android/app/FragmentManager.html#POP_BACK_STACK_INCLUSIVE`. |

### setActions

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

```
public void [setActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActions(java.util.List<androidx.leanback.widget.GuidedAction>))(@NonNull List<GuidedAction> actions)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the list of GuidedActions that the user may take in this fragment. Uses DiffCallback set by `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActionsDiffCallback(androidx.leanback.widget.DiffCallback<androidx.leanback.widget.GuidedAction>)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions` | The list of GuidedActions for this fragment. |

### setActionsDiffCallback

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

```
public void [setActionsDiffCallback](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActionsDiffCallback(androidx.leanback.widget.DiffCallback<androidx.leanback.widget.GuidedAction>))(
    @Nullable DiffCallback<GuidedAction> diffCallback
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the RecyclerView DiffCallback used when `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActions(java.util.List<androidx.leanback.widget.GuidedAction>)` is called. By default GuidedStepFragment uses `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionDiffCallback`. Sets it to null if app wants to refresh the whole list.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/DiffCallback<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> diffCallback` | DiffCallback used in `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setActions(java.util.List<androidx.leanback.widget.GuidedAction>)`. |

### setButtonActions

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

```
public void [setButtonActions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setButtonActions(java.util.List<androidx.leanback.widget.GuidedAction>))(@NonNull List<GuidedAction> actions)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the list of button GuidedActions that the user may take in this fragment.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions` | The list of button GuidedActions for this fragment. |

### setSelectedActionPosition

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

```
public void [setSelectedActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setSelectedActionPosition(int))(int position)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Scrolls the action list to the position indicated, selecting that action's view.

| Parameters |
|---|---|
| `int position` | The integer position of the action of interest. |

### setSelectedButtonActionPosition

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

```
public void [setSelectedButtonActionPosition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setSelectedButtonActionPosition(int))(int position)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Scrolls the action list to the position indicated, selecting that button action's view.

| Parameters |
|---|---|
| `int position` | The integer position of the button action of interest. |

### setUiStyle

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

```
public void [setUiStyle](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#setUiStyle(int))(int style)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Set UI style to fragment arguments. Default value is `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()` when fragment is first initialized. UI style is used to choose different fragment transition animations and determine if this is the first GuidedStepFragment on backstack. In most cases app does not directly call this method, app calls helper function `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#add(android.app.FragmentManager,androidx.leanback.app.GuidedStepFragment,int)`. However if the app creates Fragment transaction and controls backstack by itself, it would need call setUiStyle() to select the fragment transition to use.

| Parameters |
|---|---|
| `int style` | `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT()``https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()` or `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()`. |

## Protected methods

### onAddSharedElementTransition

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

```
protected void [onAddSharedElementTransition](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction,androidx.leanback.app.GuidedStepFragment))(
    @NonNull FragmentTransaction ft,
    @NonNull GuidedStepFragment disappearing
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called when this fragment is added to FragmentTransaction with `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()` (aka when the GuidedStepFragment replacing an existing GuidedStepFragment). Default implementation establishes connections between action background views to morph action background bounds change from disappearing GuidedStepFragment into this GuidedStepFragment. The default implementation heavily relies on `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist`'s layout, app may override this method when modifying the default layout of `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/app/FragmentTransaction.html ft` | The FragmentTransaction to add shared element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment disappearing` | The disappearing fragment. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` |   |
| `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideFragmentTransitions()` |   |

### onProvideFragmentTransitions

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

```
protected void [onProvideFragmentTransitions](https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#onProvideFragmentTransitions())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called by Constructor to provide fragment transitions. The default implementation assigns transitions based on `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#getUiStyle()`:

- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()` Slide from/to end(right) for enter transition, slide from/to start(left) for exit transition, shared element enter transition is set to ChangeBounds.
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE()` Enter transition is set to slide from both sides, exit transition is same as `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()`, no shared element enter transition.
- `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT()` Enter transition is set to null and app should rely on activity transition, exit transition is same as `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE()`, no shared element enter transition.

The default implementation heavily relies on `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` and `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist` layout, app may override this method when modifying the default layout of `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist` or `https://developer.android.com/reference/androidx/leanback/widget/GuidanceStylist`.

TIP: because the fragment view is removed during fragment transition, in general app cannot use two Visibility transition together. Workaround is to create your own Visibility transition that controls multiple animators (e.g. slide and fade animation in one Transition class).