# GuidedAction.BuilderBase

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.BuilderBase) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
public abstract class GuidedAction.BuilderBase<B extends GuidedAction.BuilderBase>
```

<br />

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

|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.Builder` | Builds a `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` object. |
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase` | Base Builder class to build GuidedDatePickerAction. |

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

|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.Builder` | Builder class to build a GuidedDatePickerAction. |

*** ** * ** ***

Base builder class to build a `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction` object. When subclass GuidedAction, you can override this BuilderBase class, implements your build() method which should call `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#applyValues(androidx.leanback.widget.GuidedAction)`. When using GuidedAction directly, use `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.Builder`.

| Parameters |
|---|---|
| `<B extends https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase>` | the type of BuilderBase |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#BuilderBase(android.content.Context)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context)` Creates a BuilderBase for GuidedAction or its subclass. |

| ### Public methods |
|---|---|
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#autoSaveRestoreEnabled(boolean)(boolean autoSaveRestoreEnabled)` Explicitly sets auto restore feature on the GuidedAction. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#autofillHints(java.lang.String...)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html String[] hints)` Sets autofill hints. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#checkSetId(int)(int checkSetId)` Indicates whether this action is part of a single-select group similar to radio buttons or this action is a checkbox. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#checked(boolean)(boolean checked)` Indicates whether this action is initially checked. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#clickAction(long)(long id)` Construct a clickable action with associated id and auto assign pre-defined title for the action. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#description(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 for this action. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#description(int)(@https://developer.android.com/reference/androidx/annotation/StringRes int descriptionResourceId)` Sets the description for this action. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#descriptionEditInputType(int)(int inputType)` Sets `https://developer.android.com/reference/android/text/InputType.html` of this action description in editing. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#descriptionEditable(boolean)(boolean editable)` Indicates whether this action's description is editable |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#descriptionInputType(int)(int inputType)` Sets `https://developer.android.com/reference/android/text/InputType.html` of this action description not in editing. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#editDescription(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 optional description text to edit. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#editDescription(int)(@https://developer.android.com/reference/androidx/annotation/StringRes int descriptionResourceId)` Sets the optional description text to edit. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#editInputType(int)(int inputType)` Sets `https://developer.android.com/reference/android/text/InputType.html` of this action title in editing. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#editTitle(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. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#editTitle(int)(@https://developer.android.com/reference/androidx/annotation/StringRes int editTitleResourceId)` Sets the optional title text to edit. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#editable(boolean)(boolean editable)` Indicates whether this action title is editable. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#enabled(boolean)(boolean enabled)` Indicates whether this action is enabled. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#focusable(boolean)(boolean focusable)` Indicates whether this action can take focus. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#getContext()()` Returns Context of this Builder. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#hasEditableActivatorView(boolean)(boolean editable)` Indicates whether this action has a view can be activated to edit, e.g. a DatePicker. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#hasNext(boolean)(boolean hasNext)` Indicates whether this action has a next state and should display a chevron. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#icon(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 action's icon drawable. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#icon(int)(@https://developer.android.com/reference/androidx/annotation/DrawableRes int iconResourceId)` Sets the action's icon drawable by retrieving it by resource ID from Builder's context. |
| `B` | `[iconResourceId](https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#iconResourceId(int,android.content.Context))(@https://developer.android.com/reference/androidx/annotation/DrawableRes int iconResourceId, https://developer.android.com/reference/android/content/Context.html context)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#icon(int)`. <br /> |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#id(long)(long id)` Sets the ID associated with this action. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#infoOnly(boolean)(boolean infoOnly)` Indicates whether this action is for information purposes only and cannot be clicked. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#inputType(int)(int inputType)` Sets `https://developer.android.com/reference/android/text/InputType.html` of this action title not in editing. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#intent(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 associated with this action. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#multilineDescription(boolean)(boolean multilineDescription)` Indicates whether the title and description are long, and should be displayed appropriately. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#subActions(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> subActions)` Sets sub actions list. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#title(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 for this action. |
| `B` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#title(int)(@https://developer.android.com/reference/androidx/annotation/StringRes int titleResourceId)` Sets the title for this action. |

| ### Protected methods |
|---|---|
| `final void` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#applyValues(androidx.leanback.widget.GuidedAction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedAction action)` Subclass of BuilderBase should call this function to apply values. |

## Public constructors

### BuilderBase

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

```
public BuilderBase(@NonNull Context context)
```

Creates a BuilderBase for GuidedAction or its subclass.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | Context object used to build the GuidedAction. |

## Public methods

### autoSaveRestoreEnabled

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

```
public B autoSaveRestoreEnabled(boolean autoSaveRestoreEnabled)
```

Explicitly sets auto restore feature on the GuidedAction. It's by default true.

| Parameters |
|---|---|
| `boolean autoSaveRestoreEnabled` | True if turn on auto save/restore of GuidedAction content, false otherwise. |

| Returns |
|---|---|
| `B` | The same BuilderBase object. |

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

### autofillHints

```
public B autofillHints(@Nullable String[] hints)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html String[] hints` | List of hints for autofill. |

| Returns |
|---|---|
| `B` | The same BuilderBase object. |

### checkSetId

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

```
public B checkSetId(int checkSetId)
```

Indicates whether this action is part of a single-select group similar to radio buttons or this action is a checkbox. When one item in a check set is checked, all others with the same check set ID will be checked automatically.

| Parameters |
|---|---|
| `int checkSetId` | The check set ID, or `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()` to indicate not radio or checkbox, or `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#CHECKBOX_CHECK_SET_ID()` to indicate a checkbox. |

### checked

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

```
public B checked(boolean checked)
```

Indicates whether this action is initially checked.

| Parameters |
|---|---|
| `boolean checked` | Whether this action is checked. |

### clickAction

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

```
public B clickAction(long id)
```

Construct a clickable action with associated id and auto assign pre-defined title for the action. If the id is not supported, the method simply does nothing.

| Parameters |
|---|---|
| `long id` | One of `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_OK()``https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_CANCEL()``https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_FINISH()``https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_CONTINUE()``https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_YES()``https://developer.android.com/reference/androidx/leanback/widget/GuidedAction#ACTION_ID_NO()`. |

| Returns |
|---|---|
| `B` | The same BuilderBase object. |

### description

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

```
public B description(@Nullable CharSequence description)
```

Sets the description for this action. The description is typically a longer string providing extra information on what the action will do.

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

### description

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

```
public B description(@StringRes int descriptionResourceId)
```

Sets the description for this action. The description is typically a longer string providing extra information on what the action will do.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/StringRes int descriptionResourceId` | String resource id of the description for this action. |

### descriptionEditInputType

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

```
public B descriptionEditInputType(int inputType)
```

Sets `https://developer.android.com/reference/android/text/InputType.html` of this action description in editing.

| Parameters |
|---|---|
| `int inputType` | InputType for the action description in editing. |

### descriptionEditable

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

```
public B descriptionEditable(boolean editable)
```

Indicates whether this action's description is editable

| Parameters |
|---|---|
| `boolean editable` | Whether this action description is editable. |

### descriptionInputType

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

```
public B descriptionInputType(int inputType)
```

Sets `https://developer.android.com/reference/android/text/InputType.html` of this action description not in editing.

| Parameters |
|---|---|
| `int inputType` | InputType for the action description not in editing. |

### editDescription

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

```
public B editDescription(@Nullable CharSequence description)
```

Sets the optional description text to edit. When TextView is activated, the edit description replaces the string of description.

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

### editDescription

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

```
public B editDescription(@StringRes int descriptionResourceId)
```

Sets the optional description text to edit. When TextView is activated, the edit description replaces the string of description.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/StringRes int descriptionResourceId` | String resource id of the description to edit for this action. |

### editInputType

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

```
public B editInputType(int inputType)
```

Sets `https://developer.android.com/reference/android/text/InputType.html` of this action title in editing.

| Parameters |
|---|---|
| `int inputType` | InputType for the action title in editing. |

### editTitle

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

```
public B editTitle(@Nullable CharSequence editTitle)
```

Sets the optional title text to edit. When TextView is activated, the edit title replaces the string of title.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html editTitle` | The optional title text to edit when TextView is activated. |

### editTitle

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

```
public B editTitle(@StringRes int editTitleResourceId)
```

Sets the optional title text to edit. When TextView is activated, the edit title replaces the string of title.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/StringRes int editTitleResourceId` | String resource id of the optional title text to edit when TextView is activated. |

### editable

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

```
public B editable(boolean editable)
```

Indicates whether this action title is editable. Note: Editable actions cannot also be checked, or belong to a check set.

| Parameters |
|---|---|
| `boolean editable` | Whether this action is editable. |

### enabled

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

```
public B enabled(boolean enabled)
```

Indicates whether this action is enabled. If not enabled, an action cannot be clicked.

| Parameters |
|---|---|
| `boolean enabled` | Whether the action is enabled. |

### focusable

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

```
public B focusable(boolean focusable)
```

Indicates whether this action can take focus.

| Parameters |
|---|---|
| `boolean focusable` |   |

| Returns |
|---|---|
| `B` | The same BuilderBase object. |

### getContext

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

```
public @NonNull Context getContext()
```

Returns Context of this Builder.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html` | Context of this Builder. |

### hasEditableActivatorView

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

```
public B hasEditableActivatorView(boolean editable)
```

Indicates whether this action has a view can be activated to edit, e.g. a DatePicker.

| Parameters |
|---|---|
| `boolean editable` | Whether this action has view can be activated to edit. |

### hasNext

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

```
public B hasNext(boolean hasNext)
```

Indicates whether this action has a next state and should display a chevron.

| Parameters |
|---|---|
| `boolean hasNext` | Whether this action has a next state. |

### icon

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

```
public B icon(@Nullable Drawable icon)
```

Sets the action's icon drawable.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html icon` | The drawable for the icon associated with this action. |

### icon

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

```
public B icon(@DrawableRes int iconResourceId)
```

Sets the action's icon drawable by retrieving it by resource ID from Builder's context. This is a convenience function that simply looks up the drawable and calls `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#icon(android.graphics.drawable.Drawable)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int iconResourceId` | The resource ID for the icon associated with this action. |

### iconResourceId

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

```
public B [iconResourceId](https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#iconResourceId(int,android.content.Context))(@DrawableRes int iconResourceId, Context context)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#icon(int)`.

Sets the action's icon drawable by retrieving it by resource ID from the specified context. This is a convenience function that simply looks up the drawable and calls `https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase#icon(android.graphics.drawable.Drawable)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int iconResourceId` | The resource ID for the icon associated with this action. |
| `https://developer.android.com/reference/android/content/Context.html context` | The context whose resource ID should be retrieved. |

### id

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

```
public B id(long id)
```

Sets the ID associated with this action. The ID can be any value the client wishes; it is typically used to determine what to do when an action is clicked.

| Parameters |
|---|---|
| `long id` | The ID to associate with this action. |

### infoOnly

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

```
public B infoOnly(boolean infoOnly)
```

Indicates whether this action is for information purposes only and cannot be clicked.

| Parameters |
|---|---|
| `boolean infoOnly` | Whether this action has a next state. |

### inputType

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

```
public B inputType(int inputType)
```

Sets `https://developer.android.com/reference/android/text/InputType.html` of this action title not in editing.

| Parameters |
|---|---|
| `int inputType` | InputType for the action title not in editing. |

### intent

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

```
public B intent(@Nullable Intent intent)
```

Sets the intent associated with this action. Clients would typically fire this intent directly when the action is clicked.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/Intent.html intent` | The intent associated with this action. |

### multilineDescription

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

```
public B multilineDescription(boolean multilineDescription)
```

Indicates whether the title and description are long, and should be displayed appropriately.

| Parameters |
|---|---|
| `boolean multilineDescription` | Whether this action has a multiline description. |

### subActions

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

```
public B subActions(@Nullable List<GuidedAction> subActions)
```

Sets 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> subActions` |   |

| Returns |
|---|---|
| `B` | The same BuilderBase object. |

### title

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

```
public B title(@Nullable CharSequence title)
```

Sets the title for this action. The title is typically a short string indicating the action to be taken on click, e.g. "Continue" or "Cancel".

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

### title

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

```
public B title(@StringRes int titleResourceId)
```

Sets the title for this action. The title is typically a short string indicating the action to be taken on click, e.g. "Continue" or "Cancel".

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/StringRes int titleResourceId` | The resource id of title for this action. |

## Protected methods

### applyValues

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

```
protected final void applyValues(@NonNull GuidedAction action)
```

Subclass of BuilderBase should call this function to apply values.

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