# GuidedActionsStylist

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

*** ** * ** ***


```
public class GuidedActionsStylist implements FragmentAnimationProvider
```

<br />

*** ** * ** ***

GuidedActionsStylist is used within a `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment` to supply the right-side panel where users can take actions. It consists of a container for the list of actions, and a stationary selector view that indicates visually the location of focus. GuidedActionsStylist has two different layouts: default is for normal actions including text, radio, checkbox, DatePicker, etc, the other when `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setAsButtonActions()` is called is recommended for button actions such as "yes", "no".

Many aspects of the base GuidedActionsStylist can be customized through theming; see the theme attributes below. Note that these attributes are not set on individual elements in layout XML, but instead would be set in a custom theme. See [Styles and Themes](http://developer.android.com/guide/topics/ui/themes.html) for more information.

If these hooks are insufficient, this class may also be subclassed. Subclasses may wish to override the `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideLayoutId()` method to change the layout used to display the list container and selector; override `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)` method to change the layout used to display each action.

To support a "click to activate" view similar to DatePicker, app needs:

- Override `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)`, provides a layout id for the action.
- The layout must include a widget with id "guidedactions_activator_item", the widget is toggled edit mode by `https://developer.android.com/reference/android/view/View.html#setActivated(boolean)`.
- Override `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindActivatorView(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)` to populate values into View.
- Override `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onUpdateActivatorView(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)` to update action.

Note: If an alternate list layout is provided, the following view IDs must be supplied:

- 

These view IDs must be present in order for the stylist to function. The list ID must correspond to a `https://developer.android.com/reference/androidx/leanback/widget/VerticalGridView` or subclass.

If an alternate item layout is provided, the following view IDs should be used to refer to base elements:

- 
- 
- 
- 
- 
- 

These view IDs are allowed to be missing, in which case the corresponding views in `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` will be null.

In order to support editable actions, the view associated with guidedactions_item_title should be a subclass of `https://developer.android.com/reference/android/widget/EditText.html`, and should satisfy the `https://developer.android.com/reference/androidx/leanback/widget/ImeKeyMonitor` interface and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionAutofillSupport` interface.

| See also |
|---|---|
| `https://developer.android.com/reference/android/R.attr.html#listChoiceIndicatorSingle` |   |
| `https://developer.android.com/reference/android/R.attr.html#listChoiceIndicatorMultiple` |   |
| `https://developer.android.com/reference/androidx/leanback/app/GuidedStepFragment` |   |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` |   |

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder extends https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder implements https://developer.android.com/reference/androidx/leanback/widget/FacetProvider` ViewHolder caches information about the action item layouts' subviews. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#VIEW_TYPE_DATE_PICKER() = 1` ViewType for DatePicker. |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#VIEW_TYPE_DEFAULT() = 0` Default viewType that associated with default layout Id for the action item. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#GuidedActionsStylist()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#collapseAction(boolean)(boolean withTransition)` Collapse expanded action. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#expandAction(androidx.leanback.widget.GuidedAction,boolean)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action, boolean withTransition)` Expand an action. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/VerticalGridView` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getActionsGridView()()` Returns the VerticalGridView that displays the list of GuidedActions. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getExpandedAction()()` |
| `int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` Return view type of action, each different type can have differently associated layout Id. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/VerticalGridView` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getSubActionsGridView()()` Returns the VerticalGridView that displays the sub actions list of an expanded action. |
| `final boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isBackKeyToCollapseActivatorView()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isBackKeyToCollapseSubActions()()` |
| `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isButtonActions()()` Returns true if it is button actions list, false for normal actions list. |
| `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isExpandTransitionSupported()()` Returns if expand/collapse animation is supported. |
| `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isExpanded()()` |
| `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isInExpandTransition()()` Returns true if it is running an expanding or collapsing transition, false otherwise. |
| `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isSubActionsExpanded()()` |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onAnimateItemChecked(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, boolean checked )` Animates the view holder's view (or subviews thereof) when the action has had its check state changed. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onAnimateItemFocused(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, boolean focused )` Animates the view holder's view (or subviews thereof) when the action has had its focus state changed. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onAnimateItemPressed(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, boolean pressed )` Animates the view holder's view (or subviews thereof) when the action has had its press state changed. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onAnimateItemPressedCancelled(androidx.leanback.widget.GuidedActionsStylist.ViewHolder)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh )` Resets the view holder's view to unpressed state. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindActivatorView(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action )` Performs binding activator view value to action. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindCheckMarkView(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action )` Sets states of check mark view, called by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)` when action's checkset Id is other than `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindChevronView(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action )` Sets states of chevron view, called by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)`. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action )` Binds a `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` to a particular `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/View.html` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onCreateView(android.view.LayoutInflater,android.view.ViewGroup)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/LayoutInflater.html inflater, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html container )` Creates a view appropriate for displaying a list of GuidedActions, using the provided inflater and container. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onCreateViewHolder(android.view.ViewGroup)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html parent)` Constructs a `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` capable of representing `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`s. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onCreateViewHolder(android.view.ViewGroup,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html parent, int viewType)` Constructs a `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` capable of representing `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`s. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onDestroyView()()` Called when destroy the View created by GuidedActionsStylist. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onImeAppearing(java.util.List<android.animation.Animator>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/animation/Animator.html> animators)` Animates the fragment in response to the IME appearing. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onImeDisappearing(java.util.List<android.animation.Animator>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/animation/Animator.html> animators)` Animates the fragment in response to the IME disappearing. |
| `int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId()()` Provides the resource ID of the layout defining the view for an individual guided actions. |
| `int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)(int viewType)` Provides the resource ID of the layout defining the view for an individual guided actions. |
| `int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideLayoutId()()` Provides the resource ID of the layout defining the host view for the list of guided actions. |
| `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onUpdateActivatorView(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action )` Performs updating GuidedAction from activator view. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onUpdateExpandedViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder)( @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder avh )` Expand or collapse GuidedActionStylist. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#openInEditMode(androidx.leanback.widget.GuidedAction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` Switches action to edit mode and pops up the keyboard. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setAsButtonActions()()` Choose the layout resource for button actions in `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideLayoutId()`. |
| `final void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setBackKeyToCollapseActivatorView(boolean)(boolean backToCollapse)` Enable or disable using BACK key to collapse `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` with editable activator view. |
| `final void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setBackKeyToCollapseSubActions(boolean)(boolean backToCollapse)` Enable or disable using BACK key to collapse sub actions list. |
| `void` | `[setEditingMode](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setEditingMode(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))( https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action, boolean editing )` **This method is deprecated.** This method is for internal library use only and should not be called directly. <br /> |
| `void` | `[setExpandedViewHolder](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setExpandedViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder))(https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder avh)` **This method is deprecated.** use `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#expandAction(androidx.leanback.widget.GuidedAction,boolean)` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#collapseAction(boolean)` <br /> |
| `void` | `[startExpandedTransition](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#startExpandedTransition(androidx.leanback.widget.GuidedActionsStylist.ViewHolder))(https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder avh)` **This method is deprecated.** use `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#expandAction(androidx.leanback.widget.GuidedAction,boolean)` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#collapseAction(boolean)` <br /> |

| ### Protected methods |
|---|---|
| `void` | `[onEditingModeChange](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))( https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action, boolean editing )` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean,boolean)`. <br /> |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean,boolean)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, boolean editing, boolean withTransition )` Called when editing mode of an ViewHolder is changed. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setupImeOptions(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action )` Called by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)` to setup IME options. |

## Constants

### VIEW_TYPE_DATE_PICKER

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

```
public static final int VIEW_TYPE_DATE_PICKER = 1
```

ViewType for DatePicker.

### VIEW_TYPE_DEFAULT

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

```
public static final int VIEW_TYPE_DEFAULT = 0
```

Default viewType that associated with default layout Id for the action item.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)` |   |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)` |   |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onCreateViewHolder(android.view.ViewGroup,int)` |   |

## Public constructors

### GuidedActionsStylist

Added in 1.1.0

```
public GuidedActionsStylist()
```

## Public methods

### collapseAction

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

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

Collapse expanded action. Do nothing if it is in animation or there is no action expanded.

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

### expandAction

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

```
public void expandAction(@NonNull GuidedAction action, boolean withTransition)
```

Expand an action. Do nothing if it is in animation or there is action expanded.

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

### getActionsGridView

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

```
public @Nullable VerticalGridView getActionsGridView()
```

Returns the VerticalGridView that displays the list of GuidedActions.

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

### getExpandedAction

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

```
public @Nullable GuidedAction getExpandedAction()
```

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

### getItemViewType

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

```
public int getItemViewType(@NonNull GuidedAction action)
```

Return view type of action, each different type can have differently associated layout Id. Default implementation returns `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#VIEW_TYPE_DEFAULT()`.

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

| Returns |
|---|---|
| `int` | View type that used in `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)`. |

### getSubActionsGridView

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

```
public @Nullable VerticalGridView getSubActionsGridView()
```

Returns the VerticalGridView that displays the sub actions list of an expanded action.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/VerticalGridView` | The VerticalGridView that displays the sub actions list of an expanded action. |

### isBackKeyToCollapseActivatorView

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

```
public final boolean isBackKeyToCollapseActivatorView()
```

| Returns |
|---|---|
| `boolean` | True if using BACK key to collapse `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` with editable activator view, false otherwise. Default value is true. |

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

### isBackKeyToCollapseSubActions

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

```
public final boolean isBackKeyToCollapseSubActions()
```

| Returns |
|---|---|
| `boolean` | True if using BACK key to collapse sub actions list, false otherwise. Default value is true. |

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

### isButtonActions

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

```
public boolean isButtonActions()
```

Returns true if it is button actions list, false for normal actions list.

| Returns |
|---|---|
| `boolean` | True if it is button actions list, false for normal actions list. |

### isExpandTransitionSupported

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

```
public boolean isExpandTransitionSupported()
```

Returns if expand/collapse animation is supported. When this method returns true, `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#startExpandedTransition(androidx.leanback.widget.GuidedActionsStylist.ViewHolder)` will be used. When this method returns false, `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onUpdateExpandedViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder)` will be called.

| Returns |
|---|---|
| `boolean` | True if it is running an expanding or collapsing transition, false otherwise. |

### isExpanded

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

```
public boolean isExpanded()
```

| Returns |
|---|---|
| `boolean` | True if there is `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getExpandedAction()` is not null, false otherwise. |

### isInExpandTransition

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

```
public boolean isInExpandTransition()
```

Returns true if it is running an expanding or collapsing transition, false otherwise.

| Returns |
|---|---|
| `boolean` | True if it is running an expanding or collapsing transition, false otherwise. |

### isSubActionsExpanded

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

```
public boolean isSubActionsExpanded()
```

| Returns |
|---|---|
| `boolean` | True if sub actions list is expanded. |

### onAnimateItemChecked

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

```
public void onAnimateItemChecked(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    boolean checked
)
```

Animates the view holder's view (or subviews thereof) when the action has had its check state changed. Default implementation calls setChecked() if `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder#getCheckmarkView()` is instance of `https://developer.android.com/reference/android/widget/Checkable.html`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder associated with the relevant action. |
| `boolean checked` | True if the action has become checked, false if it has become unchecked. |

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

### onAnimateItemFocused

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

```
public void onAnimateItemFocused(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    boolean focused
)
```

Animates the view holder's view (or subviews thereof) when the action has had its focus state changed.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder associated with the relevant action. |
| `boolean focused` | True if the action has become focused, false if it has lost focus. |

### onAnimateItemPressed

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

```
public void onAnimateItemPressed(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    boolean pressed
)
```

Animates the view holder's view (or subviews thereof) when the action has had its press state changed.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder associated with the relevant action. |
| `boolean pressed` | True if the action has been pressed, false if it has been unpressed. |

### onAnimateItemPressedCancelled

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

```
public void onAnimateItemPressedCancelled(
    @NonNull GuidedActionsStylist.ViewHolder vh
)
```

Resets the view holder's view to unpressed state.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder associated with the relevant action. |

### onBindActivatorView

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

```
public void onBindActivatorView(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    @NonNull GuidedAction action
)
```

Performs binding activator view value to action. Default implementation supports GuidedDatePickerAction, subclass may override to add support of other views.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | ViewHolder of activator view. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | GuidedAction to bind. |

### onBindCheckMarkView

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

```
public void onBindCheckMarkView(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    @NonNull GuidedAction action
)
```

Sets states of check mark view, called by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)` when action's checkset Id is other than `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`. Default implementation assigns drawable loaded from theme attribute `https://developer.android.com/reference/android/R.attr.html#listChoiceIndicatorMultiple` for checkbox or `https://developer.android.com/reference/android/R.attr.html#listChoiceIndicatorSingle` for radio button. Subclass rarely needs override the method, instead app can provide its own drawable that supports transition animations, change theme attributes `https://developer.android.com/reference/android/R.attr.html#listChoiceIndicatorMultiple` and `https://developer.android.com/reference/android/R.attr.html#listChoiceIndicatorSingle` in {androidx.leanback.R. styleable#LeanbackGuidedStepTheme}.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder associated with the relevant action. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The GuidedAction object to bind to. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onAnimateItemChecked(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean)` |   |

### onBindChevronView

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

```
public void onBindChevronView(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    @NonNull GuidedAction action
)
```

Sets states of chevron view, called by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)`. Subclass may override.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder associated with the relevant action. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The GuidedAction object to bind to. |

### onBindViewHolder

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

```
public void onBindViewHolder(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    @NonNull GuidedAction action
)
```

Binds a `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` to a particular `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder to be associated with the given action. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The guided action to be displayed by the view holder's view. |

| Returns |
|---|---|
| `void` | The view to be added to the caller's view hierarchy. |

### onCreateView

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

```
public @NonNull View onCreateView(
    @NonNull LayoutInflater inflater,
    @NonNull ViewGroup container
)
```

Creates a view appropriate for displaying a list of GuidedActions, using the provided inflater and container.

*Note: Does not actually add the created view to the container; the caller should do this.*

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/LayoutInflater.html inflater` | The layout inflater to be used when constructing the view. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html container` | The view group to be passed in the call to `LayoutInflater.inflate`. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/View.html` | The view to be added to the caller's view hierarchy. |

### onCreateViewHolder

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

```
public @NonNull GuidedActionsStylist.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent)
```

Constructs a `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` capable of representing `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`s. Subclasses may choose to return a subclass of ViewHolder. To support different view types, override `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onCreateViewHolder(android.view.ViewGroup,int)`

*Note: Should not actually add the created view to the parent; the caller will do this.*

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html parent` | The view group to be used as the parent of the new view. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view to be added to the caller's view hierarchy. |

### onCreateViewHolder

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

```
public @NonNull GuidedActionsStylist.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
```

Constructs a `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` capable of representing `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction`s. Subclasses may choose to return a subclass of ViewHolder.

*Note: Should not actually add the created view to the parent; the caller will do this.*

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html parent` | The view group to be used as the parent of the new view. |
| `int viewType` | The viewType returned by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)` |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view to be added to the caller's view hierarchy. |

### onDestroyView

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

```
public void onDestroyView()
```

Called when destroy the View created by GuidedActionsStylist.

### onImeAppearing

```
public void onImeAppearing(@NonNull List<Animator> animators)
```

Animates the fragment in response to the IME appearing.

### onImeDisappearing

```
public void onImeDisappearing(@NonNull List<Animator> animators)
```

Animates the fragment in response to the IME disappearing.

### onProvideItemLayoutId

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

```
public int onProvideItemLayoutId()
```

Provides the resource ID of the layout defining the view for an individual guided actions. Subclasses may override to provide their own customized layouts. The base implementation returns . If overridden, the substituted layout should contain matching IDs for any views that should be managed by the base class; this can be achieved by starting with a copy of the base layout file. Note that in order for the item to support editing, the title view should both subclass `https://developer.android.com/reference/android/widget/EditText.html` and implement `https://developer.android.com/reference/androidx/leanback/widget/ImeKeyMonitor`, `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionAutofillSupport`; see `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionEditText`. To support different types of Layouts, override `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)`.

| Returns |
|---|---|
| `int` | The resource ID of the layout to be inflated to define the view to display an individual GuidedAction. |

### onProvideItemLayoutId

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

```
public int onProvideItemLayoutId(int viewType)
```

Provides the resource ID of the layout defining the view for an individual guided actions. Subclasses may override to provide their own customized layouts. The base implementation supports:

- 
- {.

If overridden, the substituted layout should contain matching IDs for any views that should be managed by the base class; this can be achieved by starting with a copy of the base layout file. Note that in order for the item to support editing, the title view should both subclass `https://developer.android.com/reference/android/widget/EditText.html` and implement `https://developer.android.com/reference/androidx/leanback/widget/ImeKeyMonitor`; see `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionEditText`.

| Parameters |
|---|---|
| `int viewType` | View type returned by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)` |

| Returns |
|---|---|
| `int` | The resource ID of the layout to be inflated to define the view to display an individual GuidedAction. |

### onProvideLayoutId

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

```
public int onProvideLayoutId()
```

Provides the resource ID of the layout defining the host view for the list of guided actions. Subclasses may override to provide their own customized layouts. The base implementation returns or if `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#isButtonActions()` is true. If overridden, the substituted layout should contain matching IDs for any views that should be managed by the base class; this can be achieved by starting with a copy of the base layout file.

| Returns |
|---|---|
| `int` | The resource ID of the layout to be inflated to define the host view for the list of GuidedActions. |

### onUpdateActivatorView

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

```
public boolean onUpdateActivatorView(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    @NonNull GuidedAction action
)
```

Performs updating GuidedAction from activator view. Default implementation supports GuidedDatePickerAction, subclass may override to add support of other views.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | ViewHolder of activator view. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | GuidedAction to update. |

| Returns |
|---|---|
| `boolean` | True if value has been updated, false otherwise. |

### onUpdateExpandedViewHolder

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

```
public void onUpdateExpandedViewHolder(
    @Nullable GuidedActionsStylist.ViewHolder avh
)
```

Expand or collapse GuidedActionStylist.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder avh` | When not null, the GuidedActionStylist expands the sub actions of avh. When null the GuidedActionStylist will collapse sub actions. |

### openInEditMode

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

```
public void openInEditMode(@NonNull GuidedAction action)
```

Switches action to edit mode and pops up the keyboard.

### setAsButtonActions

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

```
public void setAsButtonActions()
```

Choose the layout resource for button actions in `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onProvideLayoutId()`.

### setBackKeyToCollapseActivatorView

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

```
public final void setBackKeyToCollapseActivatorView(boolean backToCollapse)
```

Enable or disable using BACK key to collapse `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` with editable activator view. Default is enabled.

| Parameters |
|---|---|
| `boolean backToCollapse` | True to enable using BACK key to collapse `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` with editable activator view. |

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

### setBackKeyToCollapseSubActions

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

```
public final void setBackKeyToCollapseSubActions(boolean backToCollapse)
```

Enable or disable using BACK key to collapse sub actions list. Default is enabled.

| Parameters |
|---|---|
| `boolean backToCollapse` | True to enable using BACK key to collapse sub actions list, false to disable. |

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

### setEditingMode

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

```
public void [setEditingMode](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setEditingMode(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))(
    GuidedActionsStylist.ViewHolder vh,
    GuidedAction action,
    boolean editing
)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> This method is for internal library use only and should not be called directly.

### setExpandedViewHolder

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

```
public void [setExpandedViewHolder](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#setExpandedViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder))(GuidedActionsStylist.ViewHolder avh)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#expandAction(androidx.leanback.widget.GuidedAction,boolean)` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#collapseAction(boolean)`

Expands or collapse the sub actions list view with transition animation

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder avh` | When not null, fill sub actions list of this ViewHolder into sub actions list and hide the other items in main list. When null, collapse the sub actions list. |

### startExpandedTransition

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

```
public void [startExpandedTransition](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#startExpandedTransition(androidx.leanback.widget.GuidedActionsStylist.ViewHolder))(GuidedActionsStylist.ViewHolder avh)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#expandAction(androidx.leanback.widget.GuidedAction,boolean)` and `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#collapseAction(boolean)`

Start transition to expand or collapse GuidedActionStylist.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder avh` | When not null, the GuidedActionStylist expands the sub actions of avh. When null the GuidedActionStylist will collapse sub actions. |

## Protected methods

### onEditingModeChange

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

```
protected void [onEditingModeChange](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))(
    GuidedActionsStylist.ViewHolder vh,
    GuidedAction action,
    boolean editing
)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean,boolean)`.

### onEditingModeChange

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

```
@CallSuper
protected void onEditingModeChange(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    boolean editing,
    boolean withTransition
)
```

Called when editing mode of an ViewHolder is changed. Subclass must call `super.onEditingModeChange(vh,editing,withTransition)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | ViewHolder to change editing mode. |
| `boolean editing` | True to enable editing, false to stop editing |
| `boolean withTransition` | True to run expand transiiton, false otherwise. |

### setupImeOptions

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

```
protected void setupImeOptions(
    @NonNull GuidedActionsStylist.ViewHolder vh,
    @NonNull GuidedAction action
)
```

Called by `https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist#onBindViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)` to setup IME options. Default implementation assigns `https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#IME_ACTION_DONE`. Subclass may override.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedActionsStylist.ViewHolder vh` | The view holder to be associated with the given action. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action` | The guided action to be displayed by the view holder's view. |