public class TimePickerFragment
extends android.app.DialogFragment
implements android.app.TimePickerDialog.OnTimeSetListener
Modifier and Type | Class and Description |
---|---|
static interface |
TimePickerFragment.TimePickerListener
Interface for the listener for the hours and minute results from the time
picker.
|
Constructor and Description |
---|
TimePickerFragment() |
Modifier and Type | Method and Description |
---|---|
void |
init(long initialTime,
TimePickerFragment.TimePickerListener listener,
boolean is24hourDisplay)
Initialize a time picker.
|
void |
init(long initialTime,
TimePickerFragment.TimePickerListener listener,
boolean is24hourDisplay,
java.util.TimeZone timeZone)
Initialize a time picker.
|
android.app.Dialog |
onCreateDialog(android.os.Bundle savedInstanceState) |
void |
onTimeSet(android.widget.TimePicker view,
int hourOfDay,
int minute) |
dismiss, dismissAllowingStateLoss, dump, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onCreate, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, show, show
equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, 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, isStateSaved, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onTrimMemory, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public void init(long initialTime, TimePickerFragment.TimePickerListener listener, boolean is24hourDisplay)
initialTime
- the initial time to be used for display in millis since epochlistener
- the listener to call when the time is selected, or is not called if
the dialog is cancelledis24hourDisplay
- is the time picker displayed in 24 hour time or 12 hour timepublic void init(long initialTime, TimePickerFragment.TimePickerListener listener, boolean is24hourDisplay, java.util.TimeZone timeZone)
initialTime
- the initial time to be used for display in millis since epochlistener
- the listener to call when the time is selected, or is not called if
the dialog is cancelledis24hourDisplay
- is the time picker displayed in 24 hour time or 12 hour timetimeZone
- the time zone for display purposespublic android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)
onCreateDialog
in class android.app.DialogFragment
public void onTimeSet(android.widget.TimePicker view, int hourOfDay, int minute)
onTimeSet
in interface android.app.TimePickerDialog.OnTimeSetListener