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

*** ** * ** ***


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

<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)\<B\> ||
|   | ↳ | [androidx.leanback.widget.GuidedDatePickerAction.BuilderBase](https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase) |

Known direct 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 GuidedDatePickerAction. Subclass this BuilderBase when app needs to subclass GuidedDatePickerAction, implement your build() which should call `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase#applyDatePickerValues(androidx.leanback.widget.GuidedDatePickerAction)`. When using GuidedDatePickerAction directly, use `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.Builder`.

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/GuidedDatePickerAction.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)` |

| ### Public methods |
|---|---|
| `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. |

| ### Protected methods |
|---|---|
| `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. |

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

## Public constructors

### BuilderBase

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

## Public methods

### date

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

```
public B date(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.

| Returns |
|---|---|
| `B` | This Builder Object. |

### datePickerFormat

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

```
public B datePickerFormat(@Nullable String format)
```

Sets format of date Picker or null for default. The format is a case insensitive String containing the day ('d'), month ('m'), and year ('y'). When the format is not specified, a default format of current locale will be used.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html format` | Format of showing Date, e.g. "YMD". |

| Returns |
|---|---|
| `B` | This Builder object. |

### maxDate

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

```
public B maxDate(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.

| Returns |
|---|---|
| `B` | This Builder Object. |

### minDate

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

```
public B minDate(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.

| Returns |
|---|---|
| `B` | This Builder Object. |

## Protected methods

### applyDatePickerValues

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

```
protected final void applyDatePickerValues(@NonNull GuidedDatePickerAction action)
```

Apply values to GuidedDatePickerAction.

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