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

*** ** * ** ***


```
class GuidedActionsStylist : FragmentAnimationProvider
```

<br />

*** ** * ** ***

GuidedActionsStylist is used within a `https://developer.android.com/reference/kotlin/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/kotlin/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/kotlin/androidx/leanback/widget/GuidedActionsStylist#onProvideLayoutId()` method to change the layout used to display the list container and selector; override `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)` and `https://developer.android.com/reference/kotlin/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/kotlin/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)` and `https://developer.android.com/reference/kotlin/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/kotlin/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/kotlin/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/kotlin/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/kotlin/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/kotlin/androidx/leanback/widget/ImeKeyMonitor` interface and `https://developer.android.com/reference/kotlin/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/kotlin/androidx/leanback/app/GuidedStepFragment` |   |
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` |   |

## Summary

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

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#VIEW_TYPE_DATE_PICKER() = 1` ViewType for DatePicker. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/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/kotlin/androidx/leanback/widget/GuidedActionsStylist#GuidedActionsStylist()()` |

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

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onEditingModeChange](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))( vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder!, action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction!, editing: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean,boolean)`. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,boolean,boolean)( vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder, editing: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, withTransition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Called when editing mode of an ViewHolder is changed. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#setupImeOptions(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction)( vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder, action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction )` Called by `https://developer.android.com/reference/kotlin/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)

```
const val VIEW_TYPE_DATE_PICKER = 1: Int
```

ViewType for DatePicker.

### VIEW_TYPE_DEFAULT

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

```
const val VIEW_TYPE_DEFAULT = 0: Int
```

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

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

## Public constructors

### GuidedActionsStylist

Added in 1.1.0

```
GuidedActionsStylist()
```

## Public functions

### collapseAction

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

```
fun collapseAction(withTransition: Boolean): Unit
```

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

| Parameters |
|---|---|
| `withTransition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True to run transition animation, false otherwsie. |

### expandAction

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

```
fun expandAction(action: GuidedAction, withTransition: Boolean): Unit
```

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

| Parameters |
|---|---|
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | Action to expand. |
| `withTransition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True to run transition animation, false otherwsie. |

### getActionsGridView

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

```
fun getActionsGridView(): VerticalGridView?
```

Returns the VerticalGridView that displays the list of GuidedActions.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun getExpandedAction(): GuidedAction?
```

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun getItemViewType(action: GuidedAction): Int
```

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

| Parameters |
|---|---|
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | The action object. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | View type that used in `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)`. |

### getSubActionsGridView

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

```
fun getSubActionsGridView(): VerticalGridView?
```

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun isBackKeyToCollapseActivatorView(): Boolean
```

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

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

### isBackKeyToCollapseSubActions

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

```
fun isBackKeyToCollapseSubActions(): Boolean
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if using BACK key to collapse sub actions list, false otherwise. Default value is true. |

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

### isButtonActions

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

```
fun isButtonActions(): Boolean
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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)

```
fun isExpandTransitionSupported(): Boolean
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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)

```
fun isExpanded(): Boolean
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if there is `https://developer.android.com/reference/kotlin/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)

```
fun isInExpandTransition(): Boolean
```

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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)

```
fun isSubActionsExpanded(): Boolean
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if sub actions list is expanded. |

### onAnimateItemChecked

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

```
fun onAnimateItemChecked(
    vh: GuidedActionsStylist.ViewHolder,
    checked: Boolean
): Unit
```

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/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder#getCheckmarkView()` is instance of `https://developer.android.com/reference/android/widget/Checkable.html`.

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder associated with the relevant action. |
| `checked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if the action has become checked, false if it has become unchecked. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun onAnimateItemFocused(
    vh: GuidedActionsStylist.ViewHolder,
    focused: Boolean
): Unit
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder associated with the relevant action. |
| `focused: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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)

```
fun onAnimateItemPressed(
    vh: GuidedActionsStylist.ViewHolder,
    pressed: Boolean
): Unit
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder associated with the relevant action. |
| `pressed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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)

```
fun onAnimateItemPressedCancelled(vh: GuidedActionsStylist.ViewHolder): Unit
```

Resets the view holder's view to unpressed state.

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | 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)

```
fun onBindActivatorView(
    vh: GuidedActionsStylist.ViewHolder,
    action: GuidedAction
): Unit
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | ViewHolder of activator view. |
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | GuidedAction to bind. |

### onBindCheckMarkView

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

```
fun onBindCheckMarkView(
    vh: GuidedActionsStylist.ViewHolder,
    action: GuidedAction
): Unit
```

Sets states of check mark view, called by `https://developer.android.com/reference/kotlin/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/kotlin/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 |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder associated with the relevant action. |
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | The GuidedAction object to bind to. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun onBindChevronView(
    vh: GuidedActionsStylist.ViewHolder,
    action: GuidedAction
): Unit
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder associated with the relevant action. |
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | The GuidedAction object to bind to. |

### onBindViewHolder

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

```
fun onBindViewHolder(
    vh: GuidedActionsStylist.ViewHolder,
    action: GuidedAction
): Unit
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder to be associated with the given action. |
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | The guided action to be displayed by the view holder's view. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | 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)

```
fun onCreateView(inflater: LayoutInflater, container: ViewGroup): View
```

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 |
|---|---|
| `inflater: https://developer.android.com/reference/android/view/LayoutInflater.html` | The layout inflater to be used when constructing the view. |
| `container: https://developer.android.com/reference/android/view/ViewGroup.html` | The view group to be passed in the call to `LayoutInflater.inflate`. |

| Returns |
|---|---|
| `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)

```
fun onCreateViewHolder(parent: ViewGroup): GuidedActionsStylist.ViewHolder
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` capable of representing `https://developer.android.com/reference/kotlin/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/kotlin/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 |
|---|---|
| `parent: https://developer.android.com/reference/android/view/ViewGroup.html` | The view group to be used as the parent of the new view. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GuidedActionsStylist.ViewHolder
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` capable of representing `https://developer.android.com/reference/kotlin/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 |
|---|---|
| `parent: https://developer.android.com/reference/android/view/ViewGroup.html` | The view group to be used as the parent of the new view. |
| `viewType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The viewType returned by `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)` |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/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)

```
fun onDestroyView(): Unit
```

Called when destroy the View created by GuidedActionsStylist.

### onImeAppearing

```
fun onImeAppearing(animators: (Mutable)List<Animator!>): Unit
```

Animates the fragment in response to the IME appearing.

### onImeDisappearing

```
fun onImeDisappearing(animators: (Mutable)List<Animator!>): Unit
```

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)

```
fun onProvideItemLayoutId(): Int
```

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/kotlin/androidx/leanback/widget/ImeKeyMonitor`, `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionAutofillSupport`; see `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionEditText`. To support different types of Layouts, override `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onProvideItemLayoutId(int)`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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)

```
fun onProvideItemLayoutId(viewType: Int): Int
```

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/kotlin/androidx/leanback/widget/ImeKeyMonitor`; see `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionEditText`.

| Parameters |
|---|---|
| `viewType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | View type returned by `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#getItemViewType(androidx.leanback.widget.GuidedAction)` |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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)

```
fun onProvideLayoutId(): Int
```

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/kotlin/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 |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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)

```
fun onUpdateActivatorView(
    vh: GuidedActionsStylist.ViewHolder,
    action: GuidedAction
): Boolean
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | ViewHolder of activator view. |
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | GuidedAction to update. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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)

```
fun onUpdateExpandedViewHolder(avh: GuidedActionsStylist.ViewHolder?): Unit
```

Expand or collapse GuidedActionStylist.

| Parameters |
|---|---|
| `avh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder?` | 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)

```
fun openInEditMode(action: GuidedAction): Unit
```

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)

```
fun setAsButtonActions(): Unit
```

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

### setBackKeyToCollapseActivatorView

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

```
fun setBackKeyToCollapseActivatorView(backToCollapse: Boolean): Unit
```

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

| Parameters |
|---|---|
| `backToCollapse: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True to enable using BACK key to collapse `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` with editable activator view. |

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

### setBackKeyToCollapseSubActions

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

```
fun setBackKeyToCollapseSubActions(backToCollapse: Boolean): Unit
```

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

| Parameters |
|---|---|
| `backToCollapse: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True to enable using BACK key to collapse sub actions list, false to disable. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasSubActions()` |   |
| `https://developer.android.com/reference/kotlin/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)

```
fun [setEditingMode](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#setEditingMode(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))(
    vh: GuidedActionsStylist.ViewHolder!,
    action: GuidedAction!,
    editing: Boolean
): Unit
```

> [!CAUTION]
> **This function 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)

```
fun [setExpandedViewHolder](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#setExpandedViewHolder(androidx.leanback.widget.GuidedActionsStylist.ViewHolder))(avh: GuidedActionsStylist.ViewHolder!): Unit
```

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

Expands or collapse the sub actions list view with transition animation

| Parameters |
|---|---|
| `avh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder!` | 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)

```
fun [startExpandedTransition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#startExpandedTransition(androidx.leanback.widget.GuidedActionsStylist.ViewHolder))(avh: GuidedActionsStylist.ViewHolder!): Unit
```

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

Start transition to expand or collapse GuidedActionStylist.

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

## Protected functions

### 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 fun [onEditingModeChange](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist#onEditingModeChange(androidx.leanback.widget.GuidedActionsStylist.ViewHolder,androidx.leanback.widget.GuidedAction,boolean))(
    vh: GuidedActionsStylist.ViewHolder!,
    action: GuidedAction!,
    editing: Boolean
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/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 fun onEditingModeChange(
    vh: GuidedActionsStylist.ViewHolder,
    editing: Boolean,
    withTransition: Boolean
): Unit
```

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

| Parameters |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | ViewHolder to change editing mode. |
| `editing: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True to enable editing, false to stop editing |
| `withTransition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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 fun setupImeOptions(
    vh: GuidedActionsStylist.ViewHolder,
    action: GuidedAction
): Unit
```

Called by `https://developer.android.com/reference/kotlin/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 |
|---|---|
| `vh: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionsStylist.ViewHolder` | The view holder to be associated with the given action. |
| `action: https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` | The guided action to be displayed by the view holder's view. |