# GuidedAction

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

*** ** * ** ***


```
class GuidedAction : Action
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) ||
|   | ↳ | [androidx.leanback.widget.GuidedAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction) |

Known direct subclasses [GuidedDatePickerAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction` | Subclass of GuidedAction that can choose a date. |

*** ** * ** ***

A data class which represents an action within a `https://developer.android.com/reference/kotlin/androidx/leanback/app/GuidedStepFragment`. GuidedActions contain at minimum a title and a description, and typically also an icon.

A GuidedAction typically represents a single action a user may take, but may also represent a possible choice out of a group of mutually exclusive choices (similar to radio buttons), or an information-only label (in which case the item cannot be clicked).

GuidedActions may optionally be checked. They may also indicate that they will request further user input on selection, in which case they will be displayed with a chevron indicator.

GuidedAction recommends to use `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.Builder`. When application subclass GuidedAction, it can subclass `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.BuilderBase`, implement its own builder() method where it should call `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.BuilderBase#applyValues(androidx.leanback.widget.GuidedAction)`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.Builder : https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.BuilderBase<https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.Builder!>` Builds a `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` object. |
| `abstract class https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.BuilderBase<B : https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.BuilderBase?>` Base builder class to build a `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction` object. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_CANCEL() = -5` Id of standard Cancel action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_CONTINUE() = -7` Id of standard Finish action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_CURRENT() = -3` When finishing editing, stay on current action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_FINISH() = -6` Id of standard Finish action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_NEXT() = -2` When finishing editing, goes to next action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_NO() = -9` Id of standard No action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_OK() = -4` Id of standard OK action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_YES() = -8` Id of standard Yes action. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#CHECKBOX_CHECK_SET_ID() = -1` Checkset Id for checkbox. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#DEFAULT_CHECK_SET_ID() = 1` Default checkset Id for radio. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET() = 0` Special check set Id that is neither checkbox nor radio. |

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#GuidedAction()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getAutofillHints()()` Returns autofill hints, see `https://developer.android.com/reference/android/view/View.html#setAutofillHints(java.lang.String...)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()()` Returns the check set id this action is a part of. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()()` Returns the description of this action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescriptionEditInputType()()` Returns InputType of action description in editing; only valid when `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescriptionInputType()()` Returns InputType of action description not in editing. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditDescription()()` Returns the optional description text to edit. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditInputType()()` Returns InputType of action title in editing; only valid when `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()()` Returns the optional title text to edit. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getInputType()()` Returns InputType of action title not in editing. |
| `https://developer.android.com/reference/android/content/Intent.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getIntent()()` Returns the intent associated with this action. |
| `(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/kotlin/androidx/leanback/widget/GuidedAction!>?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getSubActions()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()()` Returns the title of this action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasEditableActivatorView()()` Returns whether this action can be activated to edit, e.g. a DatePicker. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasMultilineDescription()()` Returns whether this action is has a multiline description. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasNext()()` Returns whether this action will request further user input when selected, such as showing another GuidedStepFragment or launching a new activity. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasSubActions()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasTextEditable()()` Returns if this action has editable title or editable description. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#infoOnly()()` Returns whether the action will only display information and is thus not clickable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isAutoSaveRestoreEnabled()()` Returns true if Action will be saved to instanceState and restored later, false otherwise. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()()` Returns whether this action is checked. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()()` Returns whether this action description is editable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditTitleUsed()()` Returns true if `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()` is not null. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()()` Returns whether this action title is editable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEnabled()()` Returns whether this action is enabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isFocusable()()` Returns whether this action is focusable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#onRestoreInstanceState(android.os.Bundle,java.lang.String)(bundle: https://developer.android.com/reference/android/os/Bundle.html, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Restore action from a bundle using a given key. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#onSaveInstanceState(android.os.Bundle,java.lang.String)(bundle: https://developer.android.com/reference/android/os/Bundle.html, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Save action into a bundle using a given key. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setChecked(boolean)(checked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether this action is checked. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setDescription(java.lang.CharSequence)(description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)` Sets the description of this action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setEditDescription(java.lang.CharSequence)(editDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)` Sets the optional description text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setDescription(java.lang.CharSequence)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setEditTitle(java.lang.CharSequence)(editTitle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)` Sets the optional title text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setTitle(java.lang.CharSequence)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether this action is enabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setFocusable(boolean)(focusable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether this action is focusable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setIntent(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html?)` Sets the intent of this action. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setSubActions(java.util.List<androidx.leanback.widget.GuidedAction>)(actions: (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/kotlin/androidx/leanback/widget/GuidedAction!>?)` Change sub actions list. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setTitle(java.lang.CharSequence)(title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)` Sets the title of this action. |

### Inherited Constants

From [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#NO_ID() = -1`

Indicates that an id has not been set.

### Inherited functions

From [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#addKeyCode(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Adds a keycode used to invoke this Action.
`https://developer.android.com/reference/android/graphics/drawable/Drawable.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getIcon()()`

Returns the icon drawable for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getId()()`

Returns the id for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getLabel1()()`

Returns the first line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getLabel2()()`

Returns the second line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#removeKeyCode(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Removes a keycode used to invoke this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#respondsToKeyCode(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns true if the Action should respond to the given keycode.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setIcon(android.graphics.drawable.Drawable)(icon: https://developer.android.com/reference/android/graphics/drawable/Drawable.html?)`

Sets the icon drawable for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setId(long)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the id for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setLabel1(java.lang.CharSequence)(label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the first line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setLabel2(java.lang.CharSequence)(label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the second line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#toString()()`

## Constants

### ACTION_ID_CANCEL

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

```
const val ACTION_ID_CANCEL = -5: Long
```

Id of standard Cancel action.

### ACTION_ID_CONTINUE

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

```
const val ACTION_ID_CONTINUE = -7: Long
```

Id of standard Finish action.

### ACTION_ID_CURRENT

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

```
const val ACTION_ID_CURRENT = -3: Long
```

When finishing editing, stay on current action.

### ACTION_ID_FINISH

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

```
const val ACTION_ID_FINISH = -6: Long
```

Id of standard Finish action.

### ACTION_ID_NEXT

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

```
const val ACTION_ID_NEXT = -2: Long
```

When finishing editing, goes to next action.

### ACTION_ID_NO

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

```
const val ACTION_ID_NO = -9: Long
```

Id of standard No action.

### ACTION_ID_OK

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

```
const val ACTION_ID_OK = -4: Long
```

Id of standard OK action.

### ACTION_ID_YES

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

```
const val ACTION_ID_YES = -8: Long
```

Id of standard Yes action.

### CHECKBOX_CHECK_SET_ID

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

```
const val CHECKBOX_CHECK_SET_ID = -1: Int
```

Checkset Id for checkbox.

### DEFAULT_CHECK_SET_ID

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

```
const val DEFAULT_CHECK_SET_ID = 1: Int
```

Default checkset Id for radio.

### NO_CHECK_SET

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

```
const val NO_CHECK_SET = 0: Int
```

Special check set Id that is neither checkbox nor radio.

## Protected constructors

### GuidedAction

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

```
protected GuidedAction()
```

## Public functions

### getAutofillHints

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

```
fun getAutofillHints(): Array<String!>!
```

Returns autofill hints, see `https://developer.android.com/reference/android/view/View.html#setAutofillHints(java.lang.String...)`.

### getCheckSetId

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

```
fun getCheckSetId(): Int
```

Returns the check set id this action is a part of. All actions in the same list with the same check set id are considered linked. When one of the actions within that set is selected, that action becomes checked, while all the other actions become unchecked.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | an integer representing the check set this action is a part of, or `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#CHECKBOX_CHECK_SET_ID()` if this is a checkbox, or `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()` if this action is not a checkbox or radiobutton. |

### getDescription

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

```
fun getDescription(): CharSequence?
```

Returns the description of this action.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | The description of this action. |

### getDescriptionEditInputType

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

```
fun getDescriptionEditInputType(): Int
```

Returns InputType of action description in editing; only valid when `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | InputType of action description in editing. |

### getDescriptionInputType

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

```
fun getDescriptionInputType(): Int
```

Returns InputType of action description not in editing.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | InputType of action description not in editing. |

### getEditDescription

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

```
fun getEditDescription(): CharSequence?
```

Returns the optional description text to edit. When not null, it is being edited instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | Optional description text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`. |

### getEditInputType

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

```
fun getEditInputType(): Int
```

Returns InputType of action title in editing; only valid when `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | InputType of action title in editing. |

### getEditTitle

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

```
fun getEditTitle(): CharSequence?
```

Returns the optional title text to edit. When not null, it is being edited instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | Optional title text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`. |

### getInputType

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

```
fun getInputType(): Int
```

Returns InputType of action title not in editing.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | InputType of action title not in editing. |

### getIntent

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

```
fun getIntent(): Intent?
```

Returns the intent associated with this action.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/content/Intent.html?` | The intent set when this action was built. |

### getSubActions

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

```
fun getSubActions(): (Mutable)List<GuidedAction!>?
```

| Returns |
|---|---|
| `(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/kotlin/androidx/leanback/widget/GuidedAction!>?` | List of sub actions or null if sub actions list is not enabled. |

### getTitle

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

```
fun getTitle(): CharSequence?
```

Returns the title of this action.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | The title set when this action was built. |

### hasEditableActivatorView

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

```
fun hasEditableActivatorView(): Boolean
```

Returns whether this action can be activated to edit, e.g. a DatePicker.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action can be activated to edit. |

### hasMultilineDescription

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

```
fun hasMultilineDescription(): Boolean
```

Returns whether this action is has a multiline description.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action was constructed as having a multiline description, false otherwise. |

### hasNext

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

```
fun hasNext(): Boolean
```

Returns whether this action will request further user input when selected, such as showing another GuidedStepFragment or launching a new activity. Configured during construction.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action will request further user input when selected, false otherwise. |

### hasSubActions

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

```
fun hasSubActions(): Boolean
```

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if has sub actions list, even it's currently empty. |

### hasTextEditable

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

```
fun hasTextEditable(): Boolean
```

Returns if this action has editable title or editable description.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if this action has editable title or editable description, false otherwise. |

### infoOnly

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

```
fun infoOnly(): Boolean
```

Returns whether the action will only display information and is thus not clickable. If both this and `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasNext()` are true, infoOnly takes precedence. The default is false. For example, this might represent e.g. the amount of storage a document uses, or the cost of an app.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if will only display information, false otherwise. |

### isAutoSaveRestoreEnabled

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

```
fun isAutoSaveRestoreEnabled(): Boolean
```

Returns true if Action will be saved to instanceState and restored later, false otherwise. The default value is true. When isAutoSaveRestoreEnabled() is true and `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getId()` is not `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#NO_ID()`:

- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()` is not `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`: save `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()`}
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction` will be saved

App may explicitly disable auto restore and handle by itself. App should override Fragment onSaveInstanceState() and onCreateActions()

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if Action will be saved to instanceState and restored later, false otherwise. |

### isChecked

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

```
fun isChecked(): Boolean
```

Returns whether this action is checked.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action is currently checked, false otherwise. |

### isDescriptionEditable

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

```
fun isDescriptionEditable(): Boolean
```

Returns whether this action description is editable.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action description is editable, false otherwise. |

### isEditTitleUsed

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

```
fun isEditTitleUsed(): Boolean
```

Returns true if `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()` is not null. When true, the `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()` is being edited instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()` is not null. |

### isEditable

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

```
fun isEditable(): Boolean
```

Returns whether this action title is editable.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action title is editable, false otherwise. |

### isEnabled

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

```
fun isEnabled(): Boolean
```

Returns whether this action is enabled.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action is currently enabled, false otherwise. |

### isFocusable

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

```
fun isFocusable(): Boolean
```

Returns whether this action is focusable.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the action is currently focusable, false otherwise. |

### onRestoreInstanceState

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

```
fun onRestoreInstanceState(bundle: Bundle, key: String): Unit
```

Restore action from a bundle using a given key. When isAutoRestore() is true:

- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()` is not `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`: save `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()`}
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction` will be saved

Subclass may override this method.

| Parameters |
|---|---|
| `bundle: https://developer.android.com/reference/android/os/Bundle.html` | Bundle to restore the Action from. |
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Key used to restore the Action. |

### onSaveInstanceState

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

```
fun onSaveInstanceState(bundle: Bundle, key: String): Unit
```

Save action into a bundle using a given key. When isAutoRestoreEna() is true:

- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()` is not `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`: save `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()`}
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction` will be saved

Subclass may override this method.

| Parameters |
|---|---|
| `bundle: https://developer.android.com/reference/android/os/Bundle.html` | Bundle to save the Action. |
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Key used to save the Action. |

### setChecked

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

```
fun setChecked(checked: Boolean): Unit
```

Sets whether this action is checked.

| Parameters |
|---|---|
| `checked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether this action should be checked. |

### setDescription

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

```
fun setDescription(description: CharSequence?): Unit
```

Sets the description of this action.

| Parameters |
|---|---|
| `description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | The description of the action. |

### setEditDescription

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

```
fun setEditDescription(editDescription: CharSequence?): Unit
```

Sets the optional description text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setDescription(java.lang.CharSequence)`.

| Parameters |
|---|---|
| `editDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | Optional description text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setDescription(java.lang.CharSequence)`. |

### setEditTitle

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

```
fun setEditTitle(editTitle: CharSequence?): Unit
```

Sets the optional title text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setTitle(java.lang.CharSequence)`.

| Parameters |
|---|---|
| `editTitle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | Optional title text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setTitle(java.lang.CharSequence)`. |

### setEnabled

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

```
fun setEnabled(enabled: Boolean): Unit
```

Sets whether this action is enabled.

| Parameters |
|---|---|
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether this action should be enabled. |

### setFocusable

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

```
fun setFocusable(focusable: Boolean): Unit
```

Sets whether this action is focusable.

| Parameters |
|---|---|
| `focusable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether this action should be focusable. |

### setIntent

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

```
fun setIntent(intent: Intent?): Unit
```

Sets the intent of this action.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html?` | New intent to set on this action. |

### setSubActions

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

```
fun setSubActions(actions: (Mutable)List<GuidedAction!>?): Unit
```

Change sub actions list.

| Parameters |
|---|---|
| `actions: (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/kotlin/androidx/leanback/widget/GuidedAction!>?` | Sub actions list to set on this action. Sets null to disable sub actions. |

### setTitle

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

```
fun setTitle(title: CharSequence?): Unit
```

Sets the title of this action.

| Parameters |
|---|---|
| `title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | The title set when this action was built. |