# GuidedDatePickerAction.Builder

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

*** ** * ** ***


```
public final class GuidedDatePickerAction.Builder extends GuidedDatePickerAction.BuilderBase<GuidedDatePickerAction.Builder>
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.leanback.widget.GuidedAction.BuilderBase](https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase) |||
|   | ↳ | [androidx.leanback.widget.GuidedDatePickerAction.BuilderBase](https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase)\<[GuidedDatePickerAction.Builder](https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.Builder)\> ||
|   |   | ↳ | [androidx.leanback.widget.GuidedDatePickerAction.Builder](https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.Builder) |

*** ** * ** ***

Builder class to build a GuidedDatePickerAction.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.Builder#Builder(android.content.Context)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context)` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction` | `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.Builder#build()()` Builds the GuidedDatePickerAction corresponding to this Builder. |

### Inherited methods

From [androidx.leanback.widget.GuidedAction.BuilderBase](https://developer.android.com/reference/androidx/leanback/widget/GuidedAction.BuilderBase) `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.
`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.
From [androidx.leanback.widget.GuidedDatePickerAction.BuilderBase](https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase) `final void` `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase#applyDatePickerValues(androidx.leanback.widget.GuidedDatePickerAction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction action)`

Apply values to GuidedDatePickerAction.
`B` `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase#date(long)(long date)`

Sets a Date for date picker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone.
`B` `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase#datePickerFormat(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html format)`

Sets format of date Picker or null for default.
`B` `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase#maxDate(long)(long maxDate)`

Sets maximum Date for date picker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone.
`B` `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase#minDate(long)(long minDate)`

Sets minimal Date for date picker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone.

## Public constructors

### Builder

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

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

## Public methods

### build

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

```
public @NonNull GuidedDatePickerAction build()
```

Builds the GuidedDatePickerAction corresponding to this Builder.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction` | The GuidedDatePickerAction as configured through this Builder. |