public abstract class SettingDateTimeDialogPreference<Options extends <any>> extends SettingDialogPreference<Options>
SettingDialogPreference implementation that is used as base for dialog preferences through
which a user can pick its preferred date or time for a specific setting preference.
This preference implementation by default displays the preferred date/time value formatted by
format specified via setFormat(SimpleDateFormat) as summary text. The subclasses of this
preference may specify theirs specific format which will be then used to format the summary text
whenever the picked date/time value changes. If no value is persisted the standard summary text
is displayed.
SettingDialogPreference.OnClickListenerPreference.BaseSavedState, Preference.OnPreferenceChangeListener, Preference.OnPreferenceClickListenerNO_DIALOG_IDDEFAULT_ORDER| Modifier and Type | Method and Description |
|---|---|
void |
onBindView(View view) |
protected Object |
onGetDefaultValue(TypedArray typedArray,
int index) |
protected CharSequence |
onGetSummaryText()
This implementation formats the current date/time value, if it is set, by format specified
via
setFormat(SimpleDateFormat), if any. |
protected void |
onSetInitialValue(boolean restoreValue,
Object defaultValue) |
void |
setFormat(SimpleDateFormat format)
Sets a format that should be used to format the preferred date/time value of this preference
as summary text.
|
getDialogId, getDialogOptions, handleOnDialogButtonClick, onConfigureDialogOptions, onCreateDialogOptions, onHandleDialogButtonClick, setOnClickListener, synchronizeSummaryViewcallChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPersistedStringSet, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isPersistent, isSelectable, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttachedToActivity, onAttachedToHierarchy, onClick, onCreateView, onDependencyChanged, onParentChanged, onPrepareForRemoval, onRestoreInstanceState, onSaveInstanceState, peekExtras, persistBoolean, persistFloat, persistInt, persistLong, persistString, persistStringSet, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setSelectable, setShouldDisableView, setSummary, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, shouldPersist, toStringprotected Object onGetDefaultValue(@NonNull TypedArray typedArray, int index)
onGetDefaultValue in class Preferenceprotected void onSetInitialValue(boolean restoreValue,
Object defaultValue)
onSetInitialValue in class Preferencepublic void setFormat(@NonNull SimpleDateFormat format)
format - The desired format.SimpleDateFormatpublic void onBindView(View view)
onBindView in class SettingPreference@Nullable protected CharSequence onGetSummaryText()
setFormat(SimpleDateFormat), if any. If there is no date/time value and format
set the standard summary text that may be obtained via Preference.getSummary() is returned.onGetSummaryText in class SettingDialogPreference<Options extends <any>>