The Android Developer Challenge is back! Submit your idea before December 2.

GuidedDatePickerAction

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

Subclass of GuidedAction that can choose a date. The Action is editable by default; to make it read only, call hasEditableActivatorView(false) on the Builder.

Summary

Nested classes

Builder class to build a GuidedDatePickerAction.

abstract

Base Builder class to build GuidedDatePickerAction.

Inherited constants

Public constructors

Subclass of GuidedAction that can choose a date.

Public methods

open Long

Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

open String!

Returns format of date Picker or null if not specified.

open Long

Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

open Long

Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

open Unit

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

open Unit
setDate(date: Long)

Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

Inherited functions

Public constructors

<init>

GuidedDatePickerAction()

Subclass of GuidedAction that can choose a date. The Action is editable by default; to make it read only, call hasEditableActivatorView(false) on the Builder.

Public methods

getDate

open fun getDate(): Long

Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

Return
Long: Current value of DatePicker Action.

getDatePickerFormat

open fun getDatePickerFormat(): String!

Returns format of date Picker or null if not specified. 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.

Return
String!: Format of showing Date, e.g. "YMD". Returns null if using current locale's default.

getMaxDate

open fun getMaxDate(): Long

Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

Return
Long: Maximum value of DatePicker Action or Long.MAX_VALUE if not set.

getMinDate

open fun getMinDate(): Long

Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone. -1 if not set.

Return
Long: Minimal value of DatePicker Action or Long.MIN_VALUE if not set.

onRestoreInstanceState

open fun onRestoreInstanceState(bundle: Bundle!, key: String!): Unit

onSaveInstanceState

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

setDate

open fun setDate(date: Long): Unit

Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in TimeZone#getDefault() time zone.

Parameters
date Long: New value to update current value of DatePicker Action.