Search this blog

How to use dialogue methods of activity class

Methods and their purpose

Shows a dialog, creating it if necessary.
Is a callback when a dialog is being created for the first time and added to the activity dialog pool.
Is a callback for updating a dialog on-the-fly.Dialogs are created once and can be used many times by an activity. This callback enables the dialog to be updated just before it is shown for each showDialog() call.
Dismisses a dialog and returns to the activity. The dialog is still available to be used again by calling showDialog() again.
Removes the dialog completely from the activity dialog pool.

Activity classes can include more than one dialog, and each dialog can be created
and then used multiple times.

You can also create an entirely custom dialog by designing an XML layout file and
using the Dialog.setContentView() method. To retrieve controls from the dialog
layout, you simply use the Dialog.findViewById() method.


Post a Comment