Google is committed to advancing racial equity for Black communities. See how.

GuidedAction

open class GuidedAction : Action
kotlin.Any
   ↳ androidx.leanback.widget.Action
   ↳ androidx.leanback.widget.GuidedAction

A data class which represents an action within a . 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 Builder. When application subclass GuidedAction, it can subclass BuilderBase, implement its own builder() method where it should call BuilderBase#applyValues(GuidedAction).

Summary

Nested classes
open

Builds a GuidedAction object.

abstract

Base builder class to build a GuidedAction object.

Constants
static Long

Id of standard Cancel action.

static Long

Id of standard Finish action.

static Long

When finishing editing, stay on current action.

static Long

Id of standard Finish action.

static Long

When finishing editing, goes to next action.

static Long

Id of standard No action.

static Long

Id of standard OK action.

static Long

Id of standard Yes action.

static Int

Checkset Id for checkbox.

static Int

Default checkset Id for radio.

static Int

Special check set Id that is neither checkbox nor radio.

Inherited constants
Protected constructors

Public methods
open Array<String!>!

Returns autofill hints, see android.view.View#setAutofillHints(String...).

open Int

Returns the check set id this action is a part of.

open CharSequence!

Returns the description of this action.

open Int

Returns InputType of action description in editing; only valid when isDescriptionEditable() is true.

open Int

Returns InputType of action description not in editing.

open CharSequence!

Returns the optional description text to edit.

open Int

Returns InputType of action title in editing; only valid when isEditable() is true.

open CharSequence!

Returns the optional title text to edit.

open Int

Returns InputType of action title not in editing.

open Intent!

Returns the intent associated with this action.

open MutableList<GuidedAction!>!

open CharSequence!

Returns the title of this action.

open Boolean

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

open Boolean

Returns whether this action is has a multiline description.

open Boolean

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

open Boolean

open Boolean

Returns if this action has editable title or editable description.

open Boolean

Returns whether the action will only display information and is thus not clickable.

Boolean

Returns true if Action will be saved to instanceState and restored later, false otherwise.

open Boolean

Returns whether this action is checked.

open Boolean

Returns whether this action description is editable.

open Boolean

Returns true if getEditTitle() is not null.

open Boolean

Returns whether this action title is editable.

open Boolean

Returns whether this action is enabled.

open Boolean

Returns whether this action is focusable.

open Unit

Restore action from a bundle using a given key.

open Unit
onSaveInstanceState(bundle: Bundle!, key: String!)

Save action into a bundle using a given key.

open Unit
setChecked(checked: Boolean)

Sets whether this action is checked.

open Unit

Sets the description of this action.

open Unit
setEditDescription(editDescription: CharSequence!)

Sets the optional description text to edit instead of setDescription(CharSequence).

open Unit

Sets the optional title text to edit instead of setTitle(CharSequence).

open Unit
setEnabled(enabled: Boolean)

Sets whether this action is enabled.

open Unit
setFocusable(focusable: Boolean)

Sets whether this action is focusable.

open Unit
setIntent(intent: Intent!)

Sets the intent of this action.

open Unit

Change sub actions list.

open Unit

Sets the title of this action.

Inherited functions