GuidedDatePickerAction.BuilderBase


abstract class GuidedDatePickerAction.BuilderBase<B : GuidedDatePickerAction.BuilderBase?> : GuidedAction.BuilderBase

Known direct subclasses
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 applyDatePickerValues. When using GuidedDatePickerAction directly, use Builder.

Parameters
<B : GuidedDatePickerAction.BuilderBase?>

the type of BuilderBase

Summary

Public constructors

BuilderBase(context: Context)

Public functions

B!
date(date: Long)

Sets a Date for date picker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.

B!

Sets format of date Picker or null for default.

B!
maxDate(maxDate: Long)

Sets maximum Date for date picker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.

B!
minDate(minDate: Long)

Sets minimal Date for date picker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.

Protected functions

Unit

Apply values to GuidedDatePickerAction.

Inherited functions

From androidx.leanback.widget.GuidedAction.BuilderBase
Unit

Subclass of BuilderBase should call this function to apply values.

B!
autoSaveRestoreEnabled(autoSaveRestoreEnabled: Boolean)

Explicitly sets auto restore feature on the GuidedAction.

B!

Sets autofill hints.

B!
checkSetId(checkSetId: Int)

Indicates whether this action is part of a single-select group similar to radio buttons or this action is a checkbox.

B!
checked(checked: Boolean)

Indicates whether this action is initially checked.

B!

Construct a clickable action with associated id and auto assign pre-defined title for the action.

B!
description(description: CharSequence?)

Sets the description for this action.

B!
description(descriptionResourceId: @StringRes Int)

Sets the description for this action.

B!

Sets InputType of this action description in editing.

B!

Indicates whether this action's description is editable

B!

Sets InputType of this action description not in editing.

B!

Sets the optional description text to edit.

B!
editDescription(descriptionResourceId: @StringRes Int)

Sets the optional description text to edit.

B!
editInputType(inputType: Int)

Sets InputType of this action title in editing.

B!
editTitle(editTitle: CharSequence?)

Sets the optional title text to edit.

B!
editTitle(editTitleResourceId: @StringRes Int)

Sets the optional title text to edit.

B!
editable(editable: Boolean)

Indicates whether this action title is editable.

B!
enabled(enabled: Boolean)

Indicates whether this action is enabled.

B!
focusable(focusable: Boolean)

Indicates whether this action can take focus.

Context

Returns Context of this Builder.

B!

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

B!
hasNext(hasNext: Boolean)

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

B!
icon(icon: Drawable?)

Sets the action's icon drawable.

B!
icon(iconResourceId: @DrawableRes Int)

Sets the action's icon drawable by retrieving it by resource ID from Builder's context.

B!
iconResourceId(iconResourceId: @DrawableRes Int, context: Context!)

This function is deprecated.

Use icon.

B!
id(id: Long)

Sets the ID associated with this action.

B!
infoOnly(infoOnly: Boolean)

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

B!
inputType(inputType: Int)

Sets InputType of this action title not in editing.

B!
intent(intent: Intent?)

Sets the intent associated with this action.

B!
multilineDescription(multilineDescription: Boolean)

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

B!

Sets sub actions list.

B!

Sets the title for this action.

B!
title(titleResourceId: @StringRes Int)

Sets the title for this action.

Public constructors

BuilderBase

Added in 1.2.0-alpha04
BuilderBase(context: Context)

Public functions

date

Added in 1.1.0
fun date(date: Long): B!

Sets a Date for date picker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.

Returns
B!

This Builder Object.

datePickerFormat

Added in 1.1.0
fun datePickerFormat(format: String?): B!

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
format: String?

Format of showing Date, e.g. "YMD".

Returns
B!

This Builder object.

maxDate

Added in 1.1.0
fun maxDate(maxDate: Long): B!

Sets maximum Date for date picker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.

Returns
B!

This Builder Object.

minDate

Added in 1.1.0
fun minDate(minDate: Long): B!

Sets minimal Date for date picker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.

Returns
B!

This Builder Object.

Protected functions

applyDatePickerValues

Added in 1.1.0
protected fun applyDatePickerValues(action: GuidedDatePickerAction): Unit

Apply values to GuidedDatePickerAction.

Parameters
action: GuidedDatePickerAction

GuidedDatePickerAction to apply values.