Android position ProgressDialog to top, bottom, etc.

By default the ProgressDialog is positioned at the center of the screen. Here is how you can position it at the bottom of the screen
ProgressDialog myDialog =, "Display Information","at the bottom...", true);

You can change the ProgressDialog position by setting the Gravity to top, bottom, etc.

What is a ProgressDialog
A dialog that displays a progress wheel or progress bar. Because it's an extension of the AlertDialog, it also supports buttons.

How to create a ProgressDialogProgressDialog dialog =, "Loading Information","Please wait...", true);

The first parameter is the application Context, the second is a title for the dialog, the third is the message, and the last parameter is whether the progress is indeterminate.

Tip:When you're ready to close your dialog, you can dismiss it by calling dismiss() on the Dialog object.

No comments:

Post a Comment

NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.