public class DatePickerDialog extends Dialog
| Modifier and Type | Class and Description |
|---|---|
static class |
DatePickerDialog.Builder |
static interface |
DatePickerDialog.OnDateChangedListener
Interface definition for a callback to be invoked when the selected date is changed.
|
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListenerACTION_NEGATIVE, ACTION_NEUTRAL, ACTION_POSITIVE, mActionHeight, mActionMinWidth, mActionOuterHeight, mActionOuterPadding, mActionPadding, mContentPadding, mDialogHorizontalPadding, mDialogVerticalPadding, mInAnimationId, mNegativeAction, mNeutralAction, mOutAnimationId, mPositiveAction, mTitle, TITLE| Constructor and Description |
|---|
DatePickerDialog(android.content.Context context) |
DatePickerDialog(android.content.Context context,
int style) |
| Modifier and Type | Method and Description |
|---|---|
Dialog |
applyStyle(int resId) |
Dialog |
cornerRadius(float radius)
Set the corner radius of this Dialog.
|
DatePickerDialog |
date(int day,
int month,
int year)
Set the selected date of this DatePickerDialog.
|
DatePickerDialog |
date(long time)
Set the selected date of this DatePickerDialog.
|
DatePickerDialog |
dateRange(int minDay,
int minMonth,
int minYear,
int maxDay,
int maxMonth,
int maxYear)
Set the range of selectable dates.
|
DatePickerDialog |
dateRange(long minTime,
long maxTime)
Set the range of selectable dates.
|
java.util.Calendar |
getCalendar() |
long |
getDate() |
int |
getDay() |
java.lang.String |
getFormattedDate(java.text.DateFormat formatter)
Get the formatted string of selected date.
|
int |
getMonth() |
int |
getYear() |
Dialog |
layoutParams(int width,
int height)
Set the params of this Dialog layout.
|
protected void |
onCreate() |
DatePickerDialog |
onDateChangedListener(DatePickerDialog.OnDateChangedListener listener)
Set the listener will be called when the selected date is changed.
|
actionBackground, actionBackground, actionRipple, actionTextAppearance, actionTextColor, actionTextColor, addContentView, backgroundColor, cancelable, canceledOnTouchOutside, clearContent, contentMargin, contentMargin, contentView, contentView, dimAmount, dismiss, dismissImmediately, dividerColor, dividerHeight, elevation, inAnimation, layoutDirection, maxElevation, maxHeight, maxWidth, negativeAction, negativeAction, negativeActionBackground, negativeActionBackground, negativeActionClickListener, negativeActionRipple, negativeActionTextAppearance, negativeActionTextColor, negativeActionTextColor, neutralAction, neutralAction, neutralActionBackground, neutralActionBackground, neutralActionClickListener, neutralActionRipple, neutralActionTextAppearance, neutralActionTextColor, neutralActionTextColor, onStart, outAnimation, positiveAction, positiveAction, positiveActionBackground, positiveActionBackground, positiveActionClickListener, positiveActionRipple, positiveActionTextAppearance, positiveActionTextColor, positiveActionTextColor, setCancelable, setCanceledOnTouchOutside, setContentView, setContentView, setContentView, setTitle, setTitle, showDivider, title, title, titleColor, titleTextAppearancecancel, closeOptionsMenu, create, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelMessage, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenupublic DatePickerDialog(android.content.Context context)
public DatePickerDialog(android.content.Context context,
int style)
public Dialog applyStyle(int resId)
applyStyle in class Dialogpublic Dialog layoutParams(int width, int height)
DialoglayoutParams in class Dialogwidth - The width param. Can be the size in pixels, or ViewGroup.LayoutParams.WRAP_CONTENT or ViewGroup.LayoutParams.MATCH_PARENT.height - The height param. Can be the size in pixels, or ViewGroup.LayoutParams.WRAP_CONTENT or ViewGroup.LayoutParams.MATCH_PARENT.public Dialog cornerRadius(float radius)
DialogcornerRadius in class Dialogradius - The corner radius.public DatePickerDialog dateRange(int minDay, int minMonth, int minYear, int maxDay, int maxMonth, int maxYear)
minDay - The day value of minimum date.minMonth - The month value of minimum date.minYear - The year value of minimum date.maxDay - The day value of maximum date.maxMonth - The month value of maximum date.maxYear - The year value of maximum date.public DatePickerDialog dateRange(long minTime, long maxTime)
minTime - The minimum date in milis.maxTime - The maximum date in milispublic DatePickerDialog date(int day, int month, int year)
day - The day value of selected date.month - The month value of selected date.year - The year value of selected date.public DatePickerDialog date(long time)
time - The date in milis.public DatePickerDialog onDateChangedListener(DatePickerDialog.OnDateChangedListener listener)
listener - The DatePickerDialog.OnDateChangedListener will be called.public int getDay()
public int getMonth()
public int getYear()
public long getDate()
public java.util.Calendar getCalendar()
public java.lang.String getFormattedDate(java.text.DateFormat formatter)
formatter - The DateFormat used to format the date.