Creating Dialogs

A dialog is usually a small window that appears in front of the current Activity. The underlying Activity loses focus and the dialog accepts all user interaction. Dialogs are normally used for notifications and short activities that directly relate to the application in progress.

The Android API supports the following types of Dialog objects:

DatePickerDialog

A dialog that allows the user to select a date. See the Hello DatePicker tutorial. Time PickerDialog

A dialog that allows the user to select a time. See the Hello TimePicker tutorial.

If you would like to customize your own dialog, you can extend the base Dialog object or any of the subclasses listed above and define a new layout. See the section on Creating a Custom Dialog below.

0 0

Post a comment