public
class
GuidedDatePickerAction
extends GuidedAction
java.lang.Object | |||
↳ | android.support.v17.leanback.widget.Action | ||
↳ | android.support.v17.leanback.widget.GuidedAction | ||
↳ | android.support.v17.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.
Nested classes | |
---|---|
class |
GuidedDatePickerAction.Builder
Builder class to build a GuidedDatePickerAction. |
class |
GuidedDatePickerAction.BuilderBase<B extends BuilderBase>
Base Builder class to build GuidedDatePickerAction. |
Inherited constants |
---|
From
class
android.support.v17.leanback.widget.GuidedAction
|
From
class
android.support.v17.leanback.widget.Action
|
Public constructors | |
---|---|
GuidedDatePickerAction()
|
Public methods | |
---|---|
long
|
getDate()
Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in
|
String
|
getDatePickerFormat()
Returns format of date Picker or null if not specified. |
long
|
getMaxDate()
Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in
|
long
|
getMinDate()
Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in
|
void
|
onRestoreInstanceState(Bundle bundle, String key)
Restore action from a bundle using a given key. |
void
|
onSaveInstanceState(Bundle bundle, String key)
Save action into a bundle using a given key. |
void
|
setDate(long date)
Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in
|
Inherited methods | |
---|---|
From
class
android.support.v17.leanback.widget.GuidedAction
| |
From
class
android.support.v17.leanback.widget.Action
| |
From
class
java.lang.Object
|
GuidedDatePickerAction ()
long getDate ()
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. |
String getDatePickerFormat ()
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. |
long getMaxDate ()
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. |
long getMinDate ()
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. |
void onRestoreInstanceState (Bundle bundle, String key)
Restore action from a bundle using a given key. When isAutoRestore() is true:
isEditable()
is true: save text of getTitle()
isDescriptionEditable()
is true: save text of getDescription()
getCheckSetId()
is not NO_CHECK_SET
: save isChecked()
}GuidedDatePickerAction
will be savedParameters | |
---|---|
bundle |
Bundle :
Bundle to restore the Action from. |
key |
String :
Key used to restore the Action.
|
void onSaveInstanceState (Bundle bundle, String key)
Save action into a bundle using a given key. When isAutoRestoreEna() is true:
isEditable()
is true: save text of getTitle()
isDescriptionEditable()
is true: save text of getDescription()
getCheckSetId()
is not NO_CHECK_SET
: save isChecked()
}GuidedDatePickerAction
will be savedParameters | |
---|---|
bundle |
Bundle :
Bundle to save the Action. |
key |
String :
Key used to save the Action.
|
void setDate (long date)
Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in
getDefault()
time zone.
Parameters | |
---|---|
date |
long :
New value to update current value of DatePicker Action.
|