public class TimePickerDialogFragment
extends android.app.DialogFragment
implements android.app.TimePickerDialog.OnTimeSetListener
DialogFragmet-class for displaying a date picker.| Constructor and Description |
|---|
TimePickerDialogFragment()
Default constructor, initializing this class by calling through to it's parent's constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
callHandler(Calendar calendar)
Calls the mandatory handler for setting the date/time the user has provided through this
DialogFragment. |
static TimePickerDialogFragment |
createDialog(Calendar calendar)
Static method to conveniently initialize a
TimePickerDialogFragment
object. |
String |
getDialogTag()
Returns the tag under which this dialog can be registered with the fragment manager.
|
void |
onAttach(android.app.Activity activity)
Called when a fragment is first attached to its activity.
|
android.app.Dialog |
onCreateDialog(android.os.Bundle savedInstanceState)
Shows an AlertDialog, sets the buttons and populates the Dialog with
content.
|
void |
onTimeSet(android.widget.TimePicker view,
int hourOfDay,
int minute)
Sets the time given by the integers
hourOfDay and
mintue using a Calendar object internally. |
dismiss, dismissAllowingStateLoss, dump, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onCancel, onCreate, onDestroyView, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, show, showequals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenupublic TimePickerDialogFragment()
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)
onCreateDialog in class android.app.DialogFragmentsavedInstanceState - The last saved instance state of the Fragment, or null if this is
a freshly created Fragment.public void onTimeSet(android.widget.TimePicker view,
int hourOfDay,
int minute)
Sets the time given by the integers hourOfDay and
mintue using a Calendar object internally.
onTimeSet in interface android.app.TimePickerDialog.OnTimeSetListenerview - The TimePicker object used to choose the date.hourOfDay - The selected year (0-23) (independent of whether 24 hour-mode is selected or not).minute - The selected month (0-59).public static TimePickerDialogFragment createDialog(Calendar calendar)
Static method to conveniently initialize a TimePickerDialogFragment
object.
The time displayed by this TimePickerDialogFragment is provided by the
Calendar object handed over to this method.
calendar - Time to be displayed by this TimePickerDialogFragmentTimePickerDialogFragment.public void onAttach(android.app.Activity activity)
onAttach in class android.app.DialogFragmentactivity - the Activity this dialog is attached to.protected void callHandler(Calendar calendar)
DialogFragment.calendar - The selected date/time.public String getDialogTag()
FragmentManager.