Android
android.app
public class

android.app.TimePickerDialog

java.lang.Object
android.app.Dialog DialogInterface KeyEvent.Callback View.OnCreateContextMenuListener Window.Callback
android.app.AlertDialog DialogInterface
android.app.TimePickerDialog DialogInterface.OnClickListener TimePicker.OnTimeChangedListener

A dialog that prompts the user for the time of day using a TimePicker.

Nested Classes
TimePickerDialog.OnTimeSetListener The callback interface used to indicate the user is done filling in the time (they clicked on the 'Set' button). 

Summary

Constants inherited from interface android.content.DialogInterface
Fields inherited from class android.app.Dialog

Public Constructors

            TimePickerDialog(Context context, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView)
            TimePickerDialog(Context context, int theme, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView)

Public Methods

          void  onClick(DialogInterface dialog, int which)
This method will be invoked when a button in the dialog is clicked.
          void  onRestoreInstanceState(Bundle savedInstanceState)
Restore the state of the dialog from a previously saved bundle.
          Bundle  onSaveInstanceState()
Saves the state of the dialog into a bundle.
          void  onTimeChanged(TimePicker view, int hourOfDay, int minute)
          void  updateTime(int hourOfDay, int minutOfHour)
Methods inherited from class android.app.AlertDialog
Methods inherited from class android.app.Dialog
Methods inherited from class java.lang.Object
Methods inherited from interface android.content.DialogInterface
Methods inherited from interface android.content.DialogInterface.OnClickListener
Methods inherited from interface android.view.KeyEvent.Callback
Methods inherited from interface android.view.View.OnCreateContextMenuListener
Methods inherited from interface android.view.Window.Callback
Methods inherited from interface android.widget.TimePicker.OnTimeChangedListener

Details

Public Constructors

public TimePickerDialog(Context context, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView)

Parameters

context Parent.
callBack How parent is notified.
hourOfDay The initial hour.
minute The initial minute.
is24HourView Whether this is a 24 hour view, or AM/PM.

public TimePickerDialog(Context context, int theme, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView)

Parameters

context Parent.
theme the theme to apply to this dialog
callBack How parent is notified.
hourOfDay The initial hour.
minute The initial minute.
is24HourView Whether this is a 24 hour view, or AM/PM.

Public Methods

public void onClick(DialogInterface dialog, int which)

This method will be invoked when a button in the dialog is clicked.

public void onRestoreInstanceState(Bundle savedInstanceState)

Restore the state of the dialog from a previously saved bundle. The default implementation restores the state of the dialog's view hierarchy that was saved in the default implementation of onSaveInstanceState(), so be sure to call through to super when overriding unless you want to do all restoring of state yourself.

Parameters

savedInstanceState The state of the dialog previously saved by onSaveInstanceState().

public Bundle onSaveInstanceState()

Saves the state of the dialog into a bundle. The default implementation saves the state of its view hierarchy, so you'll likely want to call through to super if you override this to save additional state.

Returns

  • A bundle with the state of the dialog.

public void onTimeChanged(TimePicker view, int hourOfDay, int minute)

public void updateTime(int hourOfDay, int minutOfHour)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56