# GuidedStepFragment

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1  
Deprecated since version 27.1.0  
Summary:[XML Attrs](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#lattrs)\|[Constants](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#constants)\|[Inherited Constants](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#inhconstants)\|[Ctors](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#pubmethods)\|[Protected Methods](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#promethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)  

# GuidedStepFragment

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
GuidedStepFragment
`  
`


``

extends `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)`


``


`

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

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 27.1.0.**   
use[GuidedStepSupportFragment](https://developer.android.com/reference/android/support/v17/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.

<br />

### 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:

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

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

- [addAsRoot(Activity, GuidedStepFragment, int)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity, android.support.v17.leanback.app.GuidedStepFragment, int)), to be called during Activity onCreate, adds GuidedStepFragment as the first Fragment in activity.
- [add(FragmentManager, GuidedStepFragment)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment))or[add(FragmentManager, GuidedStepFragment, int)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment, int)), to add GuidedStepFragment on top of existing Fragments or replacing existing GuidedStepFragment when moving forward to next step.
- [finishGuidedStepFragments()](https://developer.android.com/reference/android/support/v17/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[setUiStyle(int)](https://developer.android.com/reference/android/support/v17/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[GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist)is responsible for the left guidance view, while the[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/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[Theme_Leanback_GuidedStep](https://developer.android.com/reference/android/support/v17/leanback/R.style#Theme_Leanback_GuidedStep), 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[LeanbackGuidedStepTheme_guidedStepTheme](https://developer.android.com/reference/android/support/v17/leanback/R.styleable#LeanbackGuidedStepTheme_guidedStepTheme). 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[onProvideTheme()](https://developer.android.com/reference/android/support/v17/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[onCreateGuidanceStylist()](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateGuidanceStylist())and[onCreateActionsStylist()](https://developer.android.com/reference/android/support/v17/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.

<br />

### Guided sequences

GuidedStepFragments can be grouped together to provide a guided sequence. GuidedStepFragments grouped as a sequence use custom animations provided by[GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist)and[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)(or subclasses) during transitions between steps. Clients should use[add(FragmentManager, GuidedStepFragment)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.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:**

- [GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist)
- [GuidanceStylist.Guidance](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist.Guidance)
- [GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)
- [GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)

## Summary

|                                                                                                            ### XML attributes                                                                                                            ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [`LeanbackGuidedStepTheme_guidedActionContentWidthWeight`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedActionContentWidthWeight)                   |   |
| [`LeanbackGuidedStepTheme_guidedActionContentWidthWeightTwoPanels`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedActionContentWidthWeightTwoPanels) |   |
| [`LeanbackGuidedStepTheme_guidedActionsBackground`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedActionsBackground)                                 |   |
| [`LeanbackGuidedStepTheme_guidedActionsBackgroundDark`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedActionsBackgroundDark)                         |   |
| [`LeanbackGuidedStepTheme_guidedActionsElevation`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedActionsElevation)                                   |   |
| [`LeanbackGuidedStepTheme_guidedStepBackground`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedStepBackground)                                       |   |
| [`LeanbackGuidedStepTheme_guidedStepTheme`](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#attr_LeanbackGuidedStepTheme_guidedStepTheme)                                                 |   |

|                                                                                                                                                                 ### Constants                                                                                                                                                                 ||
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `String` | [EXTRA_UI_STYLE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#EXTRA_UI_STYLE) Fragment argument name for UI style.                                                                                                                                                                   |
| `int`    | [UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT) One possible value of argument[EXTRA_UI_STYLE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#EXTRA_UI_STYLE).                            |
| `int`    | [UI_STYLE_DEFAULT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_DEFAULT) *This constant was deprecated in API level 24.1.0. Same value as[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE).* |
| `int`    | [UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE) Default value for argument[EXTRA_UI_STYLE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#EXTRA_UI_STYLE).                                          |
| `int`    | [UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE) This is the case that we use GuidedStepFragment to replace another existing GuidedStepFragment when moving forward to next step.                                                                   |

|                                                                                                                                                                                                                                                                                                                 ### Inherited constants                                                                                                                                                                                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)From interface` android.content.ComponentCallbacks2 ` |-------|---------------------------------------| | `int` | `TRIM_MEMORY_BACKGROUND` <br />       | | `int` | `TRIM_MEMORY_COMPLETE` <br />         | | `int` | `TRIM_MEMORY_MODERATE` <br />         | | `int` | `TRIM_MEMORY_RUNNING_CRITICAL` <br /> | | `int` | `TRIM_MEMORY_RUNNING_LOW` <br />      | | `int` | `TRIM_MEMORY_RUNNING_MODERATE` <br /> | | `int` | `TRIM_MEMORY_UI_HIDDEN` <br />        | |

|                                                              ### Public constructors                                                              ||
|------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#GuidedStepFragment())`() ` |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ||
|-------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static int`                                                                                                                       | ` `[add](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment, int))`(`[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html)` fragmentManager, `[GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)` fragment, int id) ` Adds the specified GuidedStepFragment to the fragment stack, replacing any existing GuidedStepFragments in the stack, and configuring the fragment-to-fragment custom transitions.                                                                                                                                                                                           |
| ` static int`                                                                                                                       | ` `[add](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment))`(`[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html)` fragmentManager, `[GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)` fragment) ` Adds the specified GuidedStepFragment to the fragment stack, replacing any existing GuidedStepFragments in the stack, and configuring the fragment-to-fragment custom transitions.                                                                                                                                                                                                        |
| ` static int`                                                                                                                       | ` `[addAsRoot](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity, android.support.v17.leanback.app.GuidedStepFragment, int))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` activity, `[GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)` fragment, int id) ` Adds the specified GuidedStepFragment as content of Activity; no backstack entry is added so the activity will be dismissed when BACK key is pressed.                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[collapseAction](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#collapseAction(boolean))`(boolean withTransition) ` Collapse action which either has a sub actions list or action with[hasEditableActivatorView()](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction#hasEditableActivatorView())is true.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[collapseSubActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#collapseSubActions())`() ` Collapse sub actions list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                             | ` `[expandAction](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#expandAction(android.support.v17.leanback.widget.GuidedAction, boolean))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action, boolean withTransition) ` Expand a given action with sub actions list or[hasEditableActivatorView()](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction#hasEditableActivatorView())is true.                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                             | ` `[expandSubActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#expandSubActions(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Expand a given action's sub actions list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` `[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)                         | ` `[findActionById](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#findActionById(long))`(long id) ` Find GuidedAction by Id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` int`                                                                                                                              | ` `[findActionPositionById](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#findActionPositionById(long))`(long id) ` Find GuidedAction position in array by Id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` `[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)                         | ` `[findButtonActionById](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#findButtonActionById(long))`(long id) ` Find button GuidedAction by Id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` int`                                                                                                                              | ` `[findButtonActionPositionById](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#findButtonActionPositionById(long))`(long id) ` Find button GuidedAction position in array by Id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[finishGuidedStepFragments](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#finishGuidedStepFragments())`() ` Convenient method to close GuidedStepFragments on top of other content or finish Activity if GuidedStepFragments were started in a separate activity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[View](https://developer.android.com/reference/android/view/View.html)                                                           | ` `[getActionItemView](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getActionItemView(int))`(int position) ` Returns the view corresponding to the action at the indicated position in the list of actions for this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`>`                 | ` `[getActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getActions())`() ` Returns the list of GuidedActions that the user may take in this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` `[View](https://developer.android.com/reference/android/view/View.html)                                                           | ` `[getButtonActionItemView](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getButtonActionItemView(int))`(int position) ` Returns the view corresponding to the button action at the indicated position in the list of actions for this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`>`                 | ` `[getButtonActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getButtonActions())`() ` Returns the list of button GuidedActions that the user may take in this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` static `[GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)         | ` `[getCurrentGuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getCurrentGuidedStepFragment(android.app.FragmentManager))`(`[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html)` fm) ` Returns the current GuidedStepFragment on the fragment transaction stack.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` `[GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist)                   | ` `[getGuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getGuidanceStylist())`() ` Returns the GuidanceStylist that displays guidance information for the user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` `[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)         | ` `[getGuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getGuidedActionsStylist())`() ` Returns the GuidedActionsStylist that displays the actions the user may take.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` `[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)         | ` `[getGuidedButtonActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getGuidedButtonActionsStylist())`() ` Returns the GuidedActionsStylist that displays the button actions the user may take.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` int`                                                                                                                              | ` `[getSelectedActionPosition](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getSelectedActionPosition())`() ` Returns the position if the currently selected GuidedAction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ` int`                                                                                                                              | ` `[getSelectedButtonActionPosition](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getSelectedButtonActionPosition())`() ` Returns the position if the currently selected button GuidedAction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` int`                                                                                                                              | ` `[getUiStyle](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#getUiStyle())`() ` Read UI style from fragment arguments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` boolean`                                                                                                                          | ` `[isExpanded](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#isExpanded())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` boolean`                                                                                                                          | ` `[isFocusOutEndAllowed](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#isFocusOutEndAllowed())`() ` Returns true if allows focus out of end edge of GuidedStepFragment, false otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` boolean`                                                                                                                          | ` `[isFocusOutStartAllowed](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#isFocusOutStartAllowed())`() ` Returns true if allows focus out of start edge of GuidedStepFragment, false otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` boolean`                                                                                                                          | ` `[isSubActionsExpanded](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#isSubActionsExpanded())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[notifyActionChanged](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#notifyActionChanged(int))`(int position) ` Notify an action has changed and update its UI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[notifyButtonActionChanged](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#notifyButtonActionChanged(int))`(int position) ` Notify an button action has changed and update its UI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                                             | ` `[onCreate](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreate(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[onCreateActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>, android.os.Bundle))`(List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`> actions, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` Fills out the set of actions available to the user.                                                                                                                                                                                                                                                                                                                                |
| ` `[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)         | ` `[onCreateActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateActionsStylist())`() ` Creates the presenter used to style the guided actions panel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` `[View](https://developer.android.com/reference/android/view/View.html)                                                           | ` `[onCreateBackgroundView](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateBackgroundView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` Called by onCreateView to inflate background view.                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[onCreateButtonActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateButtonActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>, android.os.Bundle))`(List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`> actions, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` Fills out the set of actions shown at right available to the user.                                                                                                                                                                                                                                                                                                     |
| ` `[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)         | ` `[onCreateButtonActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateButtonActionsStylist())`() ` Creates the presenter used to style a sided actions panel for button only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` `[GuidanceStylist.Guidance](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist.Guidance) | ` `[onCreateGuidance](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateGuidance(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` Returns the information required to provide guidance to the user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` `[GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist)                   | ` `[onCreateGuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateGuidanceStylist())`() ` Creates the presenter used to style the guidance panel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` `[View](https://developer.android.com/reference/android/view/View.html)                                                           | ` `[onCreateView](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` <br />                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[onDestroyView](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onDestroyView())`() ` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[onGuidedActionClicked](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionClicked(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Callback invoked when an action is taken by the user.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                             | ` `[onGuidedActionEditCanceled](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Callback invoked when an action has been canceled editing, for example when user closes IME window by BACK key.                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[onGuidedActionEdited](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEdited(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` *This method was deprecated in API level 24.1.0. Override[onGuidedActionEditedAndProceed(GuidedAction)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(android.support.v17.leanback.widget.GuidedAction))and/or[onGuidedActionEditCanceled(GuidedAction)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(android.support.v17.leanback.widget.GuidedAction)).* |
| ` long`                                                                                                                             | ` `[onGuidedActionEditedAndProceed](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Callback invoked when an action has been edited, for example when user clicks confirm button in IME window.                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                                             | ` `[onGuidedActionFocused](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionFocused(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Callback invoked when an action is focused (made to be the current selection) by the user.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` int`                                                                                                                              | ` `[onProvideTheme](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onProvideTheme())`() ` Returns the theme used for styling the fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                             | ` `[onResume](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onResume())`() `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` void`                                                                                                                             | ` `[onSaveInstanceState](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onSaveInstanceState(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` outState) ` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` boolean`                                                                                                                          | ` `[onSubGuidedActionClicked](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onSubGuidedActionClicked(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Callback invoked when an action in sub actions is taken by the user.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void`                                                                                                                             | ` `[openInEditMode](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#openInEditMode(android.support.v17.leanback.widget.GuidedAction))`(`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)` action) ` Opens the provided action in edit mode and raises ime.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[popBackStackToGuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#popBackStackToGuidedStepFragment(java.lang.Class, int))`(Class guidedStepFragmentClass, int flags) ` Convenient method to pop to fragment with Given class.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` void`                                                                                                                             | ` `[setActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>))`(List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`> actions) ` Sets the list of GuidedActions that the user may take in this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ` void`                                                                                                                             | ` `[setActionsDiffCallback](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setActionsDiffCallback(android.support.v17.leanback.widget.DiffCallback<android.support.v17.leanback.widget.GuidedAction>))`(`[DiffCallback](https://developer.android.com/reference/android/support/v17/leanback/widget/DiffCallback)`<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`> diffCallback) ` Sets the RecyclerView DiffCallback used when[setActions(List)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>))is called.                                                                                        |
| ` void`                                                                                                                             | ` `[setButtonActions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setButtonActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>))`(List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`> actions) ` Sets the list of button GuidedActions that the user may take in this fragment.                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                             | ` `[setSelectedActionPosition](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setSelectedActionPosition(int))`(int position) ` Scrolls the action list to the position indicated, selecting that action's view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                                             | ` `[setSelectedButtonActionPosition](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setSelectedButtonActionPosition(int))`(int position) ` Scrolls the action list to the position indicated, selecting that button action's view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                             | ` `[setUiStyle](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setUiStyle(int))`(int style) ` Set UI style to fragment arguments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

|                                                                                                                                                                                                                                                                                                                                                                                ### Protected methods                                                                                                                                                                                                                                                                                                                                                                                ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onAddSharedElementTransition](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction, android.support.v17.leanback.app.GuidedStepFragment))`(`[FragmentTransaction](https://developer.android.com/reference/android/app/FragmentTransaction.html)` ft, `[GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)` disappearing) ` Called when this fragment is added to FragmentTransaction with[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)(aka when the GuidedStepFragment replacing an existing GuidedStepFragment). |
| ` void` | ` `[onProvideFragmentTransitions](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onProvideFragmentTransitions())`() ` Called by Constructor to provide fragment transitions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)From class` `[android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html)` ` |------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                              | ` dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3) `                                                                                                                                                                                                                                                                     | | ` final boolean`                                                                                     | ` equals(Object arg0) `                                                                                                                                                                                                                                                                                                                         | | ` final `[Activity](https://developer.android.com/reference/android/app/Activity.html)               | ` getActivity() `                                                                                                                                                                                                                                                                                                                               | | ` boolean`                                                                                           | ` getAllowEnterTransitionOverlap() `                                                                                                                                                                                                                                                                                                            | | ` boolean`                                                                                           | ` getAllowReturnTransitionOverlap() `                                                                                                                                                                                                                                                                                                           | | ` final `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                    | ` getArguments() `                                                                                                                                                                                                                                                                                                                              | | ` final `[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html) | ` getChildFragmentManager() `                                                                                                                                                                                                                                                                                                                   | | ` `[Context](https://developer.android.com/reference/android/content/Context.html)                   | ` getContext() `                                                                                                                                                                                                                                                                                                                                | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getEnterTransition() `                                                                                                                                                                                                                                                                                                                        | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getExitTransition() `                                                                                                                                                                                                                                                                                                                         | | ` final `[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html) | ` getFragmentManager() `                                                                                                                                                                                                                                                                                                                        | | ` final Object`                                                                                      | ` getHost() `                                                                                                                                                                                                                                                                                                                                   | | ` final int`                                                                                         | ` getId() `                                                                                                                                                                                                                                                                                                                                     | | ` final `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)  | ` getLayoutInflater() `                                                                                                                                                                                                                                                                                                                         | | ` `[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)           | ` getLoaderManager() `                                                                                                                                                                                                                                                                                                                          | | ` final `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)               | ` getParentFragment() `                                                                                                                                                                                                                                                                                                                         | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getReenterTransition() `                                                                                                                                                                                                                                                                                                                      | | ` final `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)     | ` getResources() `                                                                                                                                                                                                                                                                                                                              | | ` final boolean`                                                                                     | ` getRetainInstance() `                                                                                                                                                                                                                                                                                                                         | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getReturnTransition() `                                                                                                                                                                                                                                                                                                                       | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getSharedElementEnterTransition() `                                                                                                                                                                                                                                                                                                           | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getSharedElementReturnTransition() `                                                                                                                                                                                                                                                                                                          | | ` final String`                                                                                      | ` getString(int arg0, Object... arg1) `                                                                                                                                                                                                                                                                                                         | | ` final String`                                                                                      | ` getString(int arg0) `                                                                                                                                                                                                                                                                                                                         | | ` final String`                                                                                      | ` getTag() `                                                                                                                                                                                                                                                                                                                                    | | ` final `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)               | ` getTargetFragment() `                                                                                                                                                                                                                                                                                                                         | | ` final int`                                                                                         | ` getTargetRequestCode() `                                                                                                                                                                                                                                                                                                                      | | ` final CharSequence`                                                                                | ` getText(int arg0) `                                                                                                                                                                                                                                                                                                                           | | ` boolean`                                                                                           | ` getUserVisibleHint() `                                                                                                                                                                                                                                                                                                                        | | ` `[View](https://developer.android.com/reference/android/view/View.html)                            | ` getView() `                                                                                                                                                                                                                                                                                                                                   | | ` final int`                                                                                         | ` hashCode() `                                                                                                                                                                                                                                                                                                                                  | | ` static `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)              | ` instantiate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, String arg1) `                                                                                                                                                                                                                            | | ` static `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)              | ` instantiate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, String arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                                                                                                           | | ` final boolean`                                                                                     | ` isAdded() `                                                                                                                                                                                                                                                                                                                                   | | ` final boolean`                                                                                     | ` isDetached() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isHidden() `                                                                                                                                                                                                                                                                                                                                  | | ` final boolean`                                                                                     | ` isInLayout() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isRemoving() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isResumed() `                                                                                                                                                                                                                                                                                                                                 | | ` final boolean`                                                                                     | ` isStateSaved() `                                                                                                                                                                                                                                                                                                                              | | ` final boolean`                                                                                     | ` isVisible() `                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onActivityCreated(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onActivityResult(int arg0, int arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2) `                                                                                                                                                                                                                  | | ` void`                                                                                              | ` onAttach(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                              | | ` void`                                                                                              | ` onAttach(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0) `                                                                                                                                                                                                                                            | | ` void`                                                                                              | ` onAttachFragment(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` arg0) `                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onConfigurationChanged(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg0) `                                                                                                                                                                                                              | | ` boolean`                                                                                           | ` onContextItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                              | ` onCreate(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                                   | | ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html)               | ` onCreateAnimator(int arg0, boolean arg1, int arg2) `                                                                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) `                | | ` void`                                                                                              | ` onCreateOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0, `[MenuInflater](https://developer.android.com/reference/android/view/MenuInflater.html)` arg1) `                                                                                                                                           | | ` `[View](https://developer.android.com/reference/android/view/View.html)                            | ` onCreateView(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` arg0, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                   | | ` void`                                                                                              | ` onDestroy() `                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onDestroyOptionsMenu() `                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onDestroyView() `                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` onDetach() `                                                                                                                                                                                                                                                                                                                                  | | ` `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)        | ` onGetLayoutInflater(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` onHiddenChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` onInflate(`[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                   | | ` void`                                                                                              | ` onInflate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                             | | ` void`                                                                                              | ` onInflate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                           | | ` void`                                                                                              | ` onLowMemory() `                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` onMultiWindowModeChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onMultiWindowModeChanged(boolean arg0, `[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg1) `                                                                                                                                                                                              | | ` boolean`                                                                                           | ` onOptionsItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                              | ` onOptionsMenuClosed(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onPause() `                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` onPictureInPictureModeChanged(boolean arg0, `[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg1) `                                                                                                                                                                                         | | ` void`                                                                                              | ` onPictureInPictureModeChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onPrepareOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                                         | | ` void`                                                                                              | ` onRequestPermissionsResult(int arg0, String[] arg1, int[] arg2) `                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` onResume() `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                              | ` onSaveInstanceState(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` onStart() `                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` onStop() `                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                              | ` onTrimMemory(int arg0) `                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onViewCreated(`[View](https://developer.android.com/reference/android/view/View.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                               | | ` void`                                                                                              | ` onViewStateRestored(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` postponeEnterTransition() `                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` registerForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                       | | ` final void`                                                                                        | ` requestPermissions(String[] arg0, int arg1) `                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` setAllowEnterTransitionOverlap(boolean arg0) `                                                                                                                                                                                                                                                                                                | | ` void`                                                                                              | ` setAllowReturnTransitionOverlap(boolean arg0) `                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` setArguments(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` setEnterSharedElementCallback(`[SharedElementCallback](https://developer.android.com/reference/android/app/SharedElementCallback.html)` arg0) `                                                                                                                                                                                               | | ` void`                                                                                              | ` setEnterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                         | | ` void`                                                                                              | ` setExitSharedElementCallback(`[SharedElementCallback](https://developer.android.com/reference/android/app/SharedElementCallback.html)` arg0) `                                                                                                                                                                                                | | ` void`                                                                                              | ` setExitTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                          | | ` void`                                                                                              | ` setHasOptionsMenu(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setInitialSavedState(`[Fragment.SavedState](https://developer.android.com/reference/android/app/Fragment.SavedState.html)` arg0) `                                                                                                                                                                                                            | | ` void`                                                                                              | ` setMenuVisibility(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setReenterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                       | | ` void`                                                                                              | ` setRetainInstance(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setReturnTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                        | | ` void`                                                                                              | ` setSharedElementEnterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                            | | ` void`                                                                                              | ` setSharedElementReturnTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                           | | ` void`                                                                                              | ` setTargetFragment(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` arg0, int arg1) `                                                                                                                                                                                                                           | | ` void`                                                                                              | ` setUserVisibleHint(boolean arg0) `                                                                                                                                                                                                                                                                                                            | | ` boolean`                                                                                           | ` shouldShowRequestPermissionRationale(String arg0) `                                                                                                                                                                                                                                                                                           | | ` void`                                                                                              | ` startActivity(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0) `                                                                                                                                                                                                                                         | | ` void`                                                                                              | ` startActivity(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                        | | ` void`                                                                                              | ` startActivityForResult(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, int arg1) `                                                                                                                                                                                                                      | | ` void`                                                                                              | ` startActivityForResult(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, int arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                                                                                                     | | ` void`                                                                                              | ` startIntentSenderForResult(`[IntentSender](https://developer.android.com/reference/android/content/IntentSender.html)` arg0, int arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2, int arg3, int arg4, int arg5, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg6) ` | | ` void`                                                                                              | ` startPostponedEnterTransition() `                                                                                                                                                                                                                                                                                                             | | ` String`                                                                                            | ` toString() `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                              | ` unregisterForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                     | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)From interface` `[android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html)` ` |------------------|----------------------------| | ` abstract void` | ` onTrimMemory(int arg0) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)From interface` `[android.view.View.OnCreateContextMenuListener](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html)` ` |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#)From interface` `[android.content.ComponentCallbacks](https://developer.android.com/reference/android/content/ComponentCallbacks.html)` ` |------------------|------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onConfigurationChanged(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg0) ` | | ` abstract void` | ` onLowMemory() `                                                                                                                  | ||

## XML attributes

### LeanbackGuidedStepTheme_guidedActionContentWidthWeight

<br />

<br />

### LeanbackGuidedStepTheme_guidedActionContentWidthWeightTwoPanels

<br />

<br />

### LeanbackGuidedStepTheme_guidedActionsBackground

<br />

<br />

### LeanbackGuidedStepTheme_guidedActionsBackgroundDark

<br />

<br />

### LeanbackGuidedStepTheme_guidedActionsElevation

<br />

<br />

### LeanbackGuidedStepTheme_guidedStepBackground

<br />

<br />

### LeanbackGuidedStepTheme_guidedStepTheme

<br />

<br />

## Constants

### EXTRA_UI_STYLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_UI_STYLE
```

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

- [addAsRoot(Activity, GuidedStepFragment, int)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#addAsRoot(android.app.Activity, android.support.v17.leanback.app.GuidedStepFragment, int))sets to[UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT)
- [add(FragmentManager, GuidedStepFragment)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment))or[add(FragmentManager, GuidedStepFragment, int)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment, int))sets it to[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)if there is already a GuidedStepFragment on stack.
- [finishGuidedStepFragments()](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#finishGuidedStepFragments())changes current GuidedStepFragment to[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/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[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE)

Argument value can be either:

- [UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)
- [UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE)
- [UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT)

<br />

<br />

Constant Value: "uiStyle"  

### UI_STYLE_ACTIVITY_ROOT

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int UI_STYLE_ACTIVITY_ROOT
```

One possible value of argument[EXTRA_UI_STYLE](https://developer.android.com/reference/android/support/v17/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[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/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().

<br />

<br />

Constant Value: 2 (0x00000002)  

### UI_STYLE_DEFAULT

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int UI_STYLE_DEFAULT
```

<br />

**This constant was deprecated in API level 24.1.0.**   
Same value as[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE).

<br />

<br />

Constant Value: 0 (0x00000000)  

### UI_STYLE_ENTRANCE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int UI_STYLE_ENTRANCE
```

Default value for argument[EXTRA_UI_STYLE](https://developer.android.com/reference/android/support/v17/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,[finishGuidedStepFragments()](https://developer.android.com/reference/android/support/v17/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.

<br />

<br />

Constant Value: 1 (0x00000001)  

### UI_STYLE_REPLACE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int UI_STYLE_REPLACE
```

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[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE).

<br />

<br />

Constant Value: 0 (0x00000000)

## Public constructors

### GuidedStepFragment

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedStepFragment ()
```

<br />

<br />

## Public methods

### add

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int add (FragmentManager fragmentManager, 
                GuidedStepFragment fragment, 
                int id)
```

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[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)and[onAddSharedElementTransition(FragmentTransaction, GuidedStepFragment)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onAddSharedElementTransition(android.app.FragmentTransaction, android.support.v17.leanback.app.GuidedStepFragment))will be called to perform shared element transition between GuidedStepFragments.
- If current fragment on stack is not GuidedStepFragment: assign[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE)

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

  <br />

  |                                                   Parameters                                                   ||
  |-------------------|---------------------------------------------------------------------------------------------|
  | `fragmentManager` | `FragmentManager`: The FragmentManager to be used in the transaction. <br />                |
  | `fragment`        | `GuidedStepFragment`: The GuidedStepFragment to be inserted into the fragment stack. <br /> |
  | `id`              | `int`: The id of container to add GuidedStepFragment, can be android.R.id.content. <br />   |

  |                                Returns                                ||
  |-------|----------------------------------------------------------------|
  | `int` | The ID returned by the call FragmentTransaction.commit. <br /> |

### add

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int add (FragmentManager fragmentManager, 
                GuidedStepFragment fragment)
```

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[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)
- If current fragment on stack is not GuidedStepFragment: assign[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE)

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

  <br />

  |                                                   Parameters                                                   ||
  |-------------------|---------------------------------------------------------------------------------------------|
  | `fragmentManager` | `FragmentManager`: The FragmentManager to be used in the transaction. <br />                |
  | `fragment`        | `GuidedStepFragment`: The GuidedStepFragment to be inserted into the fragment stack. <br /> |

  |                                Returns                                ||
  |-------|----------------------------------------------------------------|
  | `int` | The ID returned by the call FragmentTransaction.commit. <br /> |

### addAsRoot

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int addAsRoot (Activity activity, 
                GuidedStepFragment fragment, 
                int id)
```

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.[UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT)is assigned. Note: currently fragments added using this method must be created programmatically rather than via XML.

<br />

|                                               Parameters                                                ||
|------------|---------------------------------------------------------------------------------------------|
| `activity` | `Activity`: The Activity to be used to insert GuidedstepFragment. <br />                    |
| `fragment` | `GuidedStepFragment`: The GuidedStepFragment to be inserted into the fragment stack. <br /> |
| `id`       | `int`: The id of container to add GuidedStepFragment, can be android.R.id.content. <br />   |

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

### collapseAction

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void collapseAction (boolean withTransition)
```

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

<br />

|                                       Parameters                                       ||
|------------------|----------------------------------------------------------------------|
| `withTransition` | `boolean`: True to run transition animation, false otherwise. <br /> |

### collapseSubActions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void collapseSubActions ()
```

Collapse sub actions list.

<br />

**See also:**

- [getSubActions()](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction#getSubActions())  

### expandAction

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void expandAction (GuidedAction action, 
                boolean withTransition)
```

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

<br />

|                                       Parameters                                       ||
|------------------|----------------------------------------------------------------------|
| `action`         | `GuidedAction`: GuidedAction to expand. <br />                       |
| `withTransition` | `boolean`: True to run transition animation, false otherwise. <br /> |

### expandSubActions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void expandSubActions (GuidedAction action)
```

Expand a given action's sub actions list.

<br />

|                        Parameters                        ||
|----------|------------------------------------------------|
| `action` | `GuidedAction`: GuidedAction to expand. <br /> |

**See also:**

- [expandAction(GuidedAction, boolean)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#expandAction(android.support.v17.leanback.widget.GuidedAction, boolean))  

### findActionById

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedAction findActionById (long id)
```

Find GuidedAction by Id.

<br />

|                    Parameters                    ||
|------|--------------------------------------------|
| `id` | `long`: Id of the action to search. <br /> |

|                                                                          Returns                                                                           ||
|----------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction) | GuidedAction object or null if not found. <br /> |

### findActionPositionById

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int findActionPositionById (long id)
```

Find GuidedAction position in array by Id.

<br />

|                    Parameters                    ||
|------|--------------------------------------------|
| `id` | `long`: Id of the action to search. <br /> |

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

### findButtonActionById

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedAction findButtonActionById (long id)
```

Find button GuidedAction by Id.

<br />

|                       Parameters                        ||
|------|---------------------------------------------------|
| `id` | `long`: Id of the button action to search. <br /> |

|                                                                          Returns                                                                           ||
|----------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction) | GuidedAction object or null if not found. <br /> |

### findButtonActionPositionById

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int findButtonActionPositionById (long id)
```

Find button GuidedAction position in array by Id.

<br />

|                       Parameters                        ||
|------|---------------------------------------------------|
| `id` | `long`: Id of the button action to search. <br /> |

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

### finishGuidedStepFragments

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void finishGuidedStepFragments ()
```

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[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE); if[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE)is not found, finish the activity. Note that this method must be paired with[add(FragmentManager, GuidedStepFragment, int)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.leanback.app.GuidedStepFragment, int))which sets up the stack entry name for finding which fragment we need to pop back to.

<br />

### getActionItemView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View getActionItemView (int position)
```

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

<br />

|                                Parameters                                 ||
|------------|---------------------------------------------------------------|
| `position` | `int`: The integer position of the action of interest. <br /> |

|                                                                                             Returns                                                                                              ||
|------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| [View](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. <br /> |

### getActions

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
List<GuidedAction> getActions ()
```

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

<br />

|                                                                                 Returns                                                                                 ||
|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| `List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`>` | The list of GuidedActions for this fragment. <br /> |

### getButtonActionItemView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View getButtonActionItemView (int position)
```

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

<br />

|                                    Parameters                                    ||
|------------|----------------------------------------------------------------------|
| `position` | `int`: The integer position of the button action of interest. <br /> |

|                                                                                                 Returns                                                                                                 ||
|------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| [View](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. <br /> |

### getButtonActions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
List<GuidedAction> getButtonActions ()
```

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

<br />

|                                                                                    Returns                                                                                     ||
|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
| `List<`[GuidedAction](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction)`>` | The list of button GuidedActions for this fragment. <br /> |

### getCurrentGuidedStepFragment

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedStepFragment getCurrentGuidedStepFragment (FragmentManager fm)
```

Returns the current GuidedStepFragment on the fragment transaction stack.

<br />

|           Parameters           ||
|------|--------------------------|
| `fm` | `FragmentManager` <br /> |

|                                                                                               Returns                                                                                                ||
|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| [GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment) | The current GuidedStepFragment, if any, on the fragment transaction stack. <br /> |

### getGuidanceStylist

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidanceStylist getGuidanceStylist ()
```

Returns the GuidanceStylist that displays guidance information for the user.

<br />

|                                                                            Returns                                                                            ||
|----------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist) | The GuidanceStylist for this fragment. <br /> |

### getGuidedActionsStylist

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedActionsStylist getGuidedActionsStylist ()
```

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

<br />

|                                                                                   Returns                                                                                    ||
|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|
| [GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist) | The GuidedActionsStylist for this fragment. <br /> |

### getGuidedButtonActionsStylist

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedActionsStylist getGuidedButtonActionsStylist ()
```

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

<br />

|                                                                                   Returns                                                                                    ||
|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|
| [GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist) | The GuidedActionsStylist for this fragment. <br /> |

### getSelectedActionPosition

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getSelectedActionPosition ()
```

Returns the position if the currently selected GuidedAction.

<br />

|                                    Returns                                    ||
|-------|------------------------------------------------------------------------|
| `int` | position The integer position of the currently selected action. <br /> |

### getSelectedButtonActionPosition

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getSelectedButtonActionPosition ()
```

Returns the position if the currently selected button GuidedAction.

<br />

|                                       Returns                                        ||
|-------|-------------------------------------------------------------------------------|
| `int` | position The integer position of the currently selected button action. <br /> |

### getUiStyle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getUiStyle ()
```

Read UI style from fragment arguments. Default value is[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/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.

<br />

|                                                                                                                                                                                                             Returns                                                                                                                                                                                                             ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT)[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)or[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE). <br /> |

**See also:**

- [onProvideFragmentTransitions()](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onProvideFragmentTransitions())  

### isExpanded

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isExpanded ()
```

<br />

<br />

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

### isFocusOutEndAllowed

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isFocusOutEndAllowed ()
```

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.

<br />

|                                    Returns                                    ||
|-----------|--------------------------------------------------------------------|
| `boolean` | True if allows focus out of end edge of GuidedStepFragment. <br /> |

### isFocusOutStartAllowed

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isFocusOutStartAllowed ()
```

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.

<br />

|                                     Returns                                     ||
|-----------|----------------------------------------------------------------------|
| `boolean` | True if allows focus out of start edge of GuidedStepFragment. <br /> |

### isSubActionsExpanded

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isSubActionsExpanded ()
```

<br />

<br />

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

### notifyActionChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void notifyActionChanged (int position)
```

Notify an action has changed and update its UI.

<br />

|                            Parameters                            ||
|------------|------------------------------------------------------|
| `position` | `int`: Position of the GuidedAction in array. <br /> |

### notifyButtonActionChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void notifyButtonActionChanged (int position)
```

Notify an button action has changed and update its UI.

<br />

|                               Parameters                                ||
|------------|-------------------------------------------------------------|
| `position` | `int`: Position of the button GuidedAction in array. <br /> |

### onCreate

```
void onCreate (Bundle savedInstanceState)
```

<br />

<br />

|              Parameters               ||
|----------------------|-----------------|
| `savedInstanceState` | `Bundle` <br /> |

### onCreateActions

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onCreateActions (List<GuidedAction> actions, 
                Bundle savedInstanceState)
```

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

<br />

|                                     Parameters                                     ||
|----------------------|--------------------------------------------------------------|
| `actions`            | `List`: A non-null, empty list ready to be populated. <br /> |
| `savedInstanceState` | `Bundle`: The saved instance state from onCreate. <br />     |

### onCreateActionsStylist

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedActionsStylist onCreateActionsStylist ()
```

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

<br />

|                                                                                     Returns                                                                                      ||
|--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| [GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist) | The GuidedActionsStylist used in this fragment. <br /> |

### onCreateBackgroundView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View onCreateBackgroundView (LayoutInflater inflater, 
                ViewGroup container, 
                Bundle savedInstanceState)
```

Called by onCreateView to inflate background view. Default implementation loads view from[lb_guidedstep_background](https://developer.android.com/reference/android/support/v17/leanback/R.layout#lb_guidedstep_background)which holds a reference to guidedStepBackground.

<br />

|                                  Parameters                                   ||
|-------------|------------------------------------------------------------------|
| `inflater`  | `LayoutInflater`: LayoutInflater to load background view. <br /> |
| `container` | `ViewGroup`: Parent view of background view. <br />              |

|                                                             Returns                                                              ||
|------------------------------------------------------------------------|----------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View.html) | Created background view or null if no background. <br /> |

### onCreateButtonActions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onCreateButtonActions (List<GuidedAction> actions, 
                Bundle savedInstanceState)
```

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

<br />

|                                     Parameters                                     ||
|----------------------|--------------------------------------------------------------|
| `actions`            | `List`: A non-null, empty list ready to be populated. <br /> |
| `savedInstanceState` | `Bundle`: The saved instance state from onCreate. <br />     |

### onCreateButtonActionsStylist

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidedActionsStylist onCreateButtonActionsStylist ()
```

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

<br />

|                                                                                     Returns                                                                                      ||
|--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| [GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist) | The GuidedActionsStylist used in this fragment. <br /> |

### onCreateGuidance

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidanceStylist.Guidance onCreateGuidance (Bundle savedInstanceState)
```

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

<br />

|                                     Parameters                                     ||
|----------------------|--------------------------------------------------------------|
| `savedInstanceState` | `Bundle`: The saved instance state from onCreateView. <br /> |

|                                                                                                      Returns                                                                                                      ||
|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [GuidanceStylist.Guidance](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist.Guidance) | The Guidance object representing the information used to guide the user. <br /> |

### onCreateGuidanceStylist

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
GuidanceStylist onCreateGuidanceStylist ()
```

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

<br />

|                                                                              Returns                                                                              ||
|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
| [GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist) | The GuidanceStylist used in this fragment. <br /> |

### onCreateView

```
View onCreateView (LayoutInflater inflater, 
                ViewGroup container, 
                Bundle savedInstanceState)
```

<br />

<br />

|                  Parameters                   ||
|----------------------|-------------------------|
| `inflater`           | `LayoutInflater` <br /> |
| `container`          | `ViewGroup` <br />      |
| `savedInstanceState` | `Bundle` <br />         |

|                                    Returns                                     ||
|------------------------------------------------------------------------|--------|
| [View](https://developer.android.com/reference/android/view/View.html) | <br /> |

### onDestroyView

```
void onDestroyView ()
```

<br />

<br />

### onGuidedActionClicked

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onGuidedActionClicked (GuidedAction action)
```

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

<br />

|                     Parameters                      ||
|----------|-------------------------------------------|
| `action` | `GuidedAction`: The chosen action. <br /> |

### onGuidedActionEditCanceled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onGuidedActionEditCanceled (GuidedAction action)
```

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

<br />

|                                  Parameters                                  ||
|----------|--------------------------------------------------------------------|
| `action` | `GuidedAction`: The action which has been canceled editing. <br /> |

### onGuidedActionEdited

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onGuidedActionEdited (GuidedAction action)
```

<br />

**This method was deprecated in API level 24.1.0.**   
Override[onGuidedActionEditedAndProceed(GuidedAction)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEditedAndProceed(android.support.v17.leanback.widget.GuidedAction))and/or[onGuidedActionEditCanceled(GuidedAction)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onGuidedActionEditCanceled(android.support.v17.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.

<br />

|           Parameters            ||
|----------|-----------------------|
| `action` | `GuidedAction` <br /> |

### onGuidedActionEditedAndProceed

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
long onGuidedActionEditedAndProceed (GuidedAction action)
```

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

<br />

|                            Parameters                             ||
|----------|---------------------------------------------------------|
| `action` | `GuidedAction`: The action that has been edited. <br /> |

|                                                                                                                                                   Returns                                                                                                                                                    ||
|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `long` | ID of the action will be focused or[ACTION_ID_NEXT](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction#ACTION_ID_NEXT),[ACTION_ID_CURRENT](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedAction#ACTION_ID_CURRENT). <br /> |

### onGuidedActionFocused

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onGuidedActionFocused (GuidedAction action)
```

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

<br />

|           Parameters            ||
|----------|-----------------------|
| `action` | `GuidedAction` <br /> |

### onProvideTheme

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int onProvideTheme ()
```

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

<br />

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

### onResume

```
void onResume ()
```

<br />

<br />

### onSaveInstanceState

```
void onSaveInstanceState (Bundle outState)
```

<br />

<br />

|         Parameters          ||
|------------|-----------------|
| `outState` | `Bundle` <br /> |

### onSubGuidedActionClicked

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onSubGuidedActionClicked (GuidedAction action)
```

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.

<br />

|                     Parameters                      ||
|----------|-------------------------------------------|
| `action` | `GuidedAction`: The chosen action. <br /> |

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

### openInEditMode

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void openInEditMode (GuidedAction action)
```

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[onCreateView(LayoutInflater, ViewGroup, Bundle)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)).

<br />

|           Parameters            ||
|----------|-----------------------|
| `action` | `GuidedAction` <br /> |

### popBackStackToGuidedStepFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void popBackStackToGuidedStepFragment (Class guidedStepFragmentClass, 
                int flags)
```

Convenient method to pop to fragment with Given class.

<br />

|                                                                                     Parameters                                                                                     ||
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| `guidedStepFragmentClass` | `Class`: Name of the Class of GuidedStepFragment to pop to. <br />                                                                                      |
| `flags`                   | `int`: Either 0 or[POP_BACK_STACK_INCLUSIVE](https://developer.android.com/reference/android/app/FragmentManager.html#POP_BACK_STACK_INCLUSIVE). <br /> |

### setActions

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setActions (List<GuidedAction> actions)
```

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

<br />

|                               Parameters                               ||
|-----------|-------------------------------------------------------------|
| `actions` | `List`: The list of GuidedActions for this fragment. <br /> |

### setActionsDiffCallback

added in[version 27.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setActionsDiffCallback (DiffCallback<GuidedAction> diffCallback)
```

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

<br />

|                                                                                                                        Parameters                                                                                                                        ||
|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `diffCallback` | `DiffCallback`: DiffCallback used in[setActions(List)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#setActions(java.util.List<android.support.v17.leanback.widget.GuidedAction>)). <br /> |

### setButtonActions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setButtonActions (List<GuidedAction> actions)
```

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

<br />

|                                  Parameters                                   ||
|-----------|--------------------------------------------------------------------|
| `actions` | `List`: The list of button GuidedActions for this fragment. <br /> |

### setSelectedActionPosition

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSelectedActionPosition (int position)
```

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

<br />

|                                Parameters                                 ||
|------------|---------------------------------------------------------------|
| `position` | `int`: The integer position of the action of interest. <br /> |

### setSelectedButtonActionPosition

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSelectedButtonActionPosition (int position)
```

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

<br />

|                                    Parameters                                    ||
|------------|----------------------------------------------------------------------|
| `position` | `int`: The integer position of the button action of interest. <br /> |

### setUiStyle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setUiStyle (int style)
```

Set UI style to fragment arguments. Default value is[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/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[add(FragmentManager, GuidedStepFragment, int)](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#add(android.app.FragmentManager, android.support.v17.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.

<br />

|                                                                                                                                                                                                               Parameters                                                                                                                                                                                                                ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `style` | `int`:[UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ACTIVITY_ROOT)[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE)or[UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE). <br /> |

## Protected methods

### onAddSharedElementTransition

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onAddSharedElementTransition (FragmentTransaction ft, 
                GuidedStepFragment disappearing)
```

Called when this fragment is added to FragmentTransaction with[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/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[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)'s layout, app may override this method when modifying the default layout of[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist).

<br />

|                                          Parameters                                          ||
|----------------|------------------------------------------------------------------------------|
| `ft`           | `FragmentTransaction`: The FragmentTransaction to add shared element. <br /> |
| `disappearing` | `GuidedStepFragment`: The disappearing fragment. <br />                      |

**See also:**

- [GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)
- [onProvideFragmentTransitions()](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#onProvideFragmentTransitions())  

### onProvideFragmentTransitions

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onProvideFragmentTransitions ()
```

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

- [UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/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.
- [UI_STYLE_ENTRANCE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_ENTRANCE)Enter transition is set to slide from both sides, exit transition is same as[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE), no shared element enter transition.
- [UI_STYLE_ACTIVITY_ROOT](https://developer.android.com/reference/android/support/v17/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[UI_STYLE_REPLACE](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment#UI_STYLE_REPLACE), no shared element enter transition.

The default implementation heavily relies on[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)and[GuidanceStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidanceStylist)layout, app may override this method when modifying the default layout of[GuidedActionsStylist](https://developer.android.com/reference/android/support/v17/leanback/widget/GuidedActionsStylist)or[GuidanceStylist](https://developer.android.com/reference/android/support/v17/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).

<br />

-

  ## Interfaces

  - [BrowseFragment.FragmentHost](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.FragmentHost)
  - [BrowseFragment.MainFragmentAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentAdapterProvider)
  - [BrowseFragment.MainFragmentRowsAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentRowsAdapterProvider)
  - [BrowseSupportFragment.FragmentHost](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.FragmentHost)
  - [BrowseSupportFragment.MainFragmentAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentAdapterProvider)
  - [BrowseSupportFragment.MainFragmentRowsAdapterProvider](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapterProvider)
  - [HeadersFragment.OnHeaderClickedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersFragment.OnHeaderClickedListener)
  - [HeadersFragment.OnHeaderViewSelectedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersFragment.OnHeaderViewSelectedListener)
  - [HeadersSupportFragment.OnHeaderClickedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersSupportFragment.OnHeaderClickedListener)
  - [HeadersSupportFragment.OnHeaderViewSelectedListener](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersSupportFragment.OnHeaderViewSelectedListener)
  - [SearchFragment.SearchResultProvider](https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment.SearchResultProvider)
  - [SearchSupportFragment.SearchResultProvider](https://developer.android.com/reference/android/support/v17/leanback/app/SearchSupportFragment.SearchResultProvider)
-

  ## Classes

  - [BackgroundManager](https://developer.android.com/reference/android/support/v17/leanback/app/BackgroundManager)
  - [BaseFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BaseFragment)
  - [BaseSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BaseSupportFragment)
  - [BrandedFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrandedFragment)
  - [BrandedSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrandedSupportFragment)
  - [BrowseFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment)
  - [BrowseFragment.BrowseTransitionListener](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.BrowseTransitionListener)
  - [BrowseFragment.FragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.FragmentFactory)
  - [BrowseFragment.ListRowFragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.ListRowFragmentFactory)
  - [BrowseFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentAdapter)
  - [BrowseFragment.MainFragmentAdapterRegistry](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentAdapterRegistry)
  - [BrowseFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseFragment.MainFragmentRowsAdapter)
  - [BrowseSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment)
  - [BrowseSupportFragment.BrowseTransitionListener](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.BrowseTransitionListener)
  - [BrowseSupportFragment.FragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.FragmentFactory)
  - [BrowseSupportFragment.ListRowFragmentFactory](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.ListRowFragmentFactory)
  - [BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentAdapter)
  - [BrowseSupportFragment.MainFragmentAdapterRegistry](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentAdapterRegistry)
  - [BrowseSupportFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/BrowseSupportFragment.MainFragmentRowsAdapter)
  - [DetailsFragment](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsFragment)
  - [DetailsFragmentBackgroundController](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsFragmentBackgroundController)
  - [DetailsSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsSupportFragment)
  - [DetailsSupportFragmentBackgroundController](https://developer.android.com/reference/android/support/v17/leanback/app/DetailsSupportFragmentBackgroundController)
  - [ErrorFragment](https://developer.android.com/reference/android/support/v17/leanback/app/ErrorFragment)
  - [ErrorSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/ErrorSupportFragment)
  - [GuidedStepFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepFragment)
  - [GuidedStepSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/GuidedStepSupportFragment)
  - [HeadersFragment](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersFragment)
  - [HeadersSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/HeadersSupportFragment)
  - [OnboardingFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingFragment)
  - [OnboardingSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/OnboardingSupportFragment)
  - [PlaybackFragment](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackFragment)
  - [PlaybackFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackFragmentGlueHost)
  - [PlaybackSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackSupportFragment)
  - [PlaybackSupportFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/PlaybackSupportFragmentGlueHost)
  - [ProgressBarManager](https://developer.android.com/reference/android/support/v17/leanback/app/ProgressBarManager)
  - [RowsFragment](https://developer.android.com/reference/android/support/v17/leanback/app/RowsFragment)
  - [RowsFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsFragment.MainFragmentAdapter)
  - [RowsFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsFragment.MainFragmentRowsAdapter)
  - [RowsSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/RowsSupportFragment)
  - [RowsSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsSupportFragment.MainFragmentAdapter)
  - [RowsSupportFragment.MainFragmentRowsAdapter](https://developer.android.com/reference/android/support/v17/leanback/app/RowsSupportFragment.MainFragmentRowsAdapter)
  - [SearchFragment](https://developer.android.com/reference/android/support/v17/leanback/app/SearchFragment)
  - [SearchSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/SearchSupportFragment)
  - [VerticalGridFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VerticalGridFragment)
  - [VerticalGridSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VerticalGridSupportFragment)
  - [VideoFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VideoFragment)
  - [VideoFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/VideoFragmentGlueHost)
  - [VideoSupportFragment](https://developer.android.com/reference/android/support/v17/leanback/app/VideoSupportFragment)
  - [VideoSupportFragmentGlueHost](https://developer.android.com/reference/android/support/v17/leanback/app/VideoSupportFragmentGlueHost)