public static class CreateEventActivity.TimePickerFragment
extends DialogFragment
implements android.app.TimePickerDialog.OnTimeSetListener
Modifier and Type | Field and Description |
---|---|
private int |
hour |
private boolean |
isSet |
private int |
minute |
private android.widget.TimePicker |
timePicker |
Constructor and Description |
---|
TimePickerFragment() |
Modifier and Type | Method and Description |
---|---|
int |
getHour()
Return the selected hour
|
int |
getMinute()
Return the selected minute
|
android.widget.TimePicker |
getTimePicker()
Return the TimePicker
|
boolean |
isSet()
Check whether the user has set a time yet
|
android.app.Dialog |
onCreateDialog(android.os.Bundle savedInstanceState)
Called when the fragment is created
Sets the initial state of the clock to the current time and returns the resulting
TimePickerDialog to display
|
void |
onTimeSet(android.widget.TimePicker view,
int inHour,
int inMin)
When user sets the time, show their choice in the eventTime textView
|
private android.widget.TimePicker timePicker
private int hour
private int minute
private boolean isSet
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)
savedInstanceState
- Last saved state of fragmentpublic void onTimeSet(android.widget.TimePicker view, int inHour, int inMin)
onTimeSet
in interface android.app.TimePickerDialog.OnTimeSetListener
view
- The time picker shown via the fragmentinHour
- Hour the user setinMin
- Minute the user setpublic android.widget.TimePicker getTimePicker()
public int getHour()
public int getMinute()
public boolean isSet()