public class TimePickerDialog extends Dialog
| Modifier and Type | Class and Description |
|---|---|
static class |
TimePickerDialog.Builder |
static interface |
TimePickerDialog.OnTimeChangedListener
Interface definition for a callback to be invoked when the selected time 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 |
|---|
TimePickerDialog(android.content.Context context) |
TimePickerDialog(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.
|
java.lang.String |
getFormattedTime(java.text.DateFormat formatter)
Get the formatted string of selected time.
|
int |
getHour() |
int |
getMinute() |
TimePickerDialog |
hour(int hour)
Set the selected hour value.
|
Dialog |
layoutParams(int width,
int height)
Set the params of this Dialog layout.
|
TimePickerDialog |
minute(int minute)
Set the selected minute value.
|
protected void |
onCreate() |
TimePickerDialog |
onTimeChangedListener(TimePickerDialog.OnTimeChangedListener listener)
Set a listener will be called when the selected time 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 TimePickerDialog(android.content.Context context)
public TimePickerDialog(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 TimePickerDialog hour(int hour)
hour - The selected hour value.public TimePickerDialog minute(int minute)
minute - The selected minute value.public TimePickerDialog onTimeChangedListener(TimePickerDialog.OnTimeChangedListener listener)
listener - The TimePickerDialog.OnTimeChangedListener will be called.public int getHour()
public int getMinute()
public java.lang.String getFormattedTime(java.text.DateFormat formatter)
formatter - The DateFormat used to format the time.