GuidedDatePickerAction
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 types |
|---|
|
Builder class to build a GuidedDatePickerAction. |
abstract class GuidedDatePickerAction.BuilderBase<B : GuidedDatePickerAction.BuilderBase?> : GuidedAction.BuilderBaseBase Builder class to build GuidedDatePickerAction. |
Public constructors |
|---|
Public functions |
|
|---|---|
Long |
getDate()Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in |
String? |
Returns format of date Picker or null if not specified. |
Long |
Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in |
Long |
Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in |
Unit |
onRestoreInstanceState(bundle: Bundle, key: String?)Restore action from a bundle using a given key. |
Unit |
onSaveInstanceState(bundle: Bundle, key: String?)Save action into a bundle using a given key. |
Unit |
Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in |
Inherited Constants |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited functions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
Public functions
getDate
fun getDate(): Long
Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.
| Returns | |
|---|---|
Long |
Current value of DatePicker Action. |
getDatePickerFormat
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.
| Returns | |
|---|---|
String? |
Format of showing Date, e.g. "YMD". Returns null if using current locale's default. |
getMaxDate
fun getMaxDate(): Long
Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone.
| Returns | |
|---|---|
Long |
Maximum value of DatePicker Action or Long.MAX_VALUE if not set. |
getMinDate
fun getMinDate(): Long
Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in getDefault time zone. -1 if not set.
| Returns | |
|---|---|
Long |
Minimal value of DatePicker Action or Long.MIN_VALUE if not set. |
onRestoreInstanceState
fun onRestoreInstanceState(bundle: Bundle, key: String?): Unit
Restore action from a bundle using a given key. When isAutoRestore() is true:
isEditableis true: save text ofgetTitleisDescriptionEditableis true: save text ofgetDescriptiongetCheckSetIdis notNO_CHECK_SET: saveisChecked}GuidedDatePickerActionwill be saved
onSaveInstanceState
fun onSaveInstanceState(bundle: Bundle, key: String?): Unit
Save action into a bundle using a given key. When isAutoRestoreEna() is true:
isEditableis true: save text ofgetTitleisDescriptionEditableis true: save text ofgetDescriptiongetCheckSetIdis notNO_CHECK_SET: saveisChecked}GuidedDatePickerActionwill be saved