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

*** ** * ** ***


```
public class GuidedAction extends Action
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.leanback.widget.Action](https://developer.android.com/reference/androidx/leanback/widget/Action) ||
|   | ↳ | [androidx.leanback.widget.GuidedAction](https://developer.android.com/reference/androidx/leanback/widget/GuidedAction) |

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

|---|---|
| `https://developer.android.com/reference/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/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/androidx/leanback/widget/GuidedAction.Builder`. When application subclass GuidedAction, it can subclass `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase`, implement its own builder() method where it should call `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#applyValues(androidx.leanback.widget.GuidedAction)`.

## Summary

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

| ### Constants |
|---|---|
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_CANCEL() = -5` Id of standard Cancel action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_CONTINUE() = -7` Id of standard Finish action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_CURRENT() = -3` When finishing editing, stay on current action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_FINISH() = -6` Id of standard Finish action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_NEXT() = -2` When finishing editing, goes to next action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_NO() = -9` Id of standard No action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_OK() = -4` Id of standard OK action. |
| `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_YES() = -8` Id of standard Yes action. |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#CHECKBOX_CHECK_SET_ID() = -1` Checkset Id for checkbox. |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#DEFAULT_CHECK_SET_ID() = 1` Default checkset Id for radio. |
| `static final int` | `https://developer.android.com/reference/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/androidx/leanback/widget/GuidedAction#GuidedAction()()` |

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

### Inherited Constants

From [androidx.leanback.widget.Action](https://developer.android.com/reference/androidx/leanback/widget/Action) `static final long` `https://developer.android.com/reference/androidx/leanback/widget/Action#NO_ID() = -1`

Indicates that an id has not been set.

### Inherited methods

From [androidx.leanback.widget.Action](https://developer.android.com/reference/androidx/leanback/widget/Action) `final void` `https://developer.android.com/reference/androidx/leanback/widget/Action#addKeyCode(int)(int keyCode)`

Adds a keycode used to invoke this Action.
`final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/androidx/leanback/widget/Action#getIcon()()`

Returns the icon drawable for this Action.
`final long` `https://developer.android.com/reference/androidx/leanback/widget/Action#getId()()`

Returns the id for this Action.
`final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/androidx/leanback/widget/Action#getLabel1()()`

Returns the first line label for this Action.
`final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/androidx/leanback/widget/Action#getLabel2()()`

Returns the second line label for this Action.
`final void` `https://developer.android.com/reference/androidx/leanback/widget/Action#removeKeyCode(int)(int keyCode)`

Removes a keycode used to invoke this Action.
`final boolean` `https://developer.android.com/reference/androidx/leanback/widget/Action#respondsToKeyCode(int)(int keyCode)`

Returns true if the Action should respond to the given keycode.
`final void` `https://developer.android.com/reference/androidx/leanback/widget/Action#setIcon(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html icon)`

Sets the icon drawable for this Action.
`final void` `https://developer.android.com/reference/androidx/leanback/widget/Action#setId(long)(long id)`

Sets the id for this Action.
`final void` `https://developer.android.com/reference/androidx/leanback/widget/Action#setLabel1(java.lang.CharSequence)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html label)`

Sets the first line label for this Action.
`final void` `https://developer.android.com/reference/androidx/leanback/widget/Action#setLabel2(java.lang.CharSequence)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html label)`

Sets the second line label for this Action.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/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)

```
public static final long ACTION_ID_CANCEL = -5
```

Id of standard Cancel action.

### ACTION_ID_CONTINUE

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

```
public static final long ACTION_ID_CONTINUE = -7
```

Id of standard Finish action.

### ACTION_ID_CURRENT

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

```
public static final long ACTION_ID_CURRENT = -3
```

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)

```
public static final long ACTION_ID_FINISH = -6
```

Id of standard Finish action.

### ACTION_ID_NEXT

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

```
public static final long ACTION_ID_NEXT = -2
```

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)

```
public static final long ACTION_ID_NO = -9
```

Id of standard No action.

### ACTION_ID_OK

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

```
public static final long ACTION_ID_OK = -4
```

Id of standard OK action.

### ACTION_ID_YES

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

```
public static final long ACTION_ID_YES = -8
```

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)

```
public static final int CHECKBOX_CHECK_SET_ID = -1
```

Checkset Id for checkbox.

### DEFAULT_CHECK_SET_ID

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

```
public static final int DEFAULT_CHECK_SET_ID = 1
```

Default checkset Id for radio.

### NO_CHECK_SET

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

```
public static final int NO_CHECK_SET = 0
```

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 methods

### getAutofillHints

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

```
public String[] getAutofillHints()
```

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)

```
public int getCheckSetId()
```

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 |
|---|---|
| `int` | an integer representing the check set this action is a part of, or `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#CHECKBOX_CHECK_SET_ID()` if this is a checkbox, or `https://developer.android.com/reference/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)

```
public @Nullable CharSequence getDescription()
```

Returns the description of this action.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | The description of this action. |

### getDescriptionEditInputType

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

```
public int getDescriptionEditInputType()
```

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

| Returns |
|---|---|
| `int` | InputType of action description in editing. |

### getDescriptionInputType

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

```
public int getDescriptionInputType()
```

Returns InputType of action description not in editing.

| Returns |
|---|---|
| `int` | InputType of action description not in editing. |

### getEditDescription

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

```
public @Nullable CharSequence getEditDescription()
```

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

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | Optional description text to edit instead of `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#getDescription()`. |

### getEditInputType

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

```
public int getEditInputType()
```

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

| Returns |
|---|---|
| `int` | InputType of action title in editing. |

### getEditTitle

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

```
public @Nullable CharSequence getEditTitle()
```

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

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | Optional title text to edit instead of `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#getTitle()`. |

### getInputType

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

```
public int getInputType()
```

Returns InputType of action title not in editing.

| Returns |
|---|---|
| `int` | InputType of action title not in editing. |

### getIntent

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

```
public @Nullable Intent getIntent()
```

Returns the intent associated with this action.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html 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)

```
public @Nullable List<GuidedAction> getSubActions()
```

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/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)

```
public @Nullable CharSequence getTitle()
```

Returns the title of this action.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.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)

```
public boolean hasEditableActivatorView()
```

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

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

```
public boolean hasMultilineDescription()
```

Returns whether this action is has a multiline description.

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

```
public boolean hasNext()
```

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

```
public boolean hasSubActions()
```

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

```
public boolean hasTextEditable()
```

Returns if this action has editable title or editable description.

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

```
public boolean infoOnly()
```

Returns whether the action will only display information and is thus not clickable. If both this and `https://developer.android.com/reference/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 |
|---|---|
| `boolean` | 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)

```
public final boolean isAutoSaveRestoreEnabled()
```

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/androidx/leanback/widget/Action#getId()` is not `https://developer.android.com/reference/androidx/leanback/widget/Action#NO_ID()`:

- `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#isEditable()` is true: save text of `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#getTitle()`
- `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true: save text of `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#getDescription()`
- `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#getCheckSetId()` is not `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`: save `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#isChecked()`}
- `https://developer.android.com/reference/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 |
|---|---|
| `boolean` | 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)

```
public boolean isChecked()
```

Returns whether this action is checked.

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

```
public boolean isDescriptionEditable()
```

Returns whether this action description is editable.

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

```
public boolean isEditTitleUsed()
```

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

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

```
public boolean isEditable()
```

Returns whether this action title is editable.

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

```
public boolean isEnabled()
```

Returns whether this action is enabled.

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

```
public boolean isFocusable()
```

Returns whether this action is focusable.

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

```
public void onRestoreInstanceState(@NonNull Bundle bundle, @NonNull String key)
```

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

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

Subclass may override this method.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html bundle` | Bundle to restore the Action from. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html key` | Key used to restore the Action. |

### onSaveInstanceState

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

```
public void onSaveInstanceState(@NonNull Bundle bundle, @NonNull String key)
```

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

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

Subclass may override this method.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/Bundle.html bundle` | Bundle to save the Action. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html key` | Key used to save the Action. |

### setChecked

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

```
public void setChecked(boolean checked)
```

Sets whether this action is checked.

| Parameters |
|---|---|
| `boolean checked` | Whether this action should be checked. |

### setDescription

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

```
public void setDescription(@Nullable CharSequence description)
```

Sets the description of this action.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html description` | The description of the action. |

### setEditDescription

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

```
public void setEditDescription(@Nullable CharSequence editDescription)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html editDescription` | Optional description text to edit instead of `https://developer.android.com/reference/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)

```
public void setEditTitle(@Nullable CharSequence editTitle)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html editTitle` | Optional title text to edit instead of `https://developer.android.com/reference/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)

```
public void setEnabled(boolean enabled)
```

Sets whether this action is enabled.

| Parameters |
|---|---|
| `boolean enabled` | Whether this action should be enabled. |

### setFocusable

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

```
public void setFocusable(boolean focusable)
```

Sets whether this action is focusable.

| Parameters |
|---|---|
| `boolean focusable` | Whether this action should be focusable. |

### setIntent

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

```
public void setIntent(@Nullable Intent intent)
```

Sets the intent of this action.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/Intent.html intent` | New intent to set on this action. |

### setSubActions

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

```
public void setSubActions(@Nullable List<GuidedAction> actions)
```

Change sub actions list.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/GuidedAction> actions` | 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)

```
public void setTitle(@Nullable CharSequence title)
```

Sets the title of this action.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html title` | The title set when this action was built. |