public class

ProgressDialog

extends AlertDialog
java.lang.Object
   ↳ android.app.Dialog
     ↳ android.app.AlertDialog
       ↳ android.app.ProgressDialog

Class Overview

A dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time.

The dialog can be made cancelable on back key press.

The progress range is 0..10000.

Summary

Constants
int STYLE_HORIZONTAL Creates a ProgressDialog with a horizontal progress bar.
int STYLE_SPINNER Creates a ProgressDialog with a ciruclar, spinning progress bar.
[Expand]
Inherited Constants
From interface android.content.DialogInterface
Public Constructors
ProgressDialog(Context context)
ProgressDialog(Context context, int theme)
Public Methods
int getMax()
int getProgress()
int getSecondaryProgress()
void incrementProgressBy(int diff)
void incrementSecondaryProgressBy(int diff)
boolean isIndeterminate()
void onStart()
Called when the dialog is starting.
void setIndeterminate(boolean indeterminate)
void setIndeterminateDrawable(Drawable d)
void setMax(int max)
void setMessage(CharSequence message)
void setProgress(int value)
void setProgressDrawable(Drawable d)
void setProgressStyle(int style)
void setSecondaryProgress(int secondaryProgress)
static ProgressDialog show(Context context, CharSequence title, CharSequence message)
static ProgressDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate)
static ProgressDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable)
static ProgressDialog show(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, DialogInterface.OnCancelListener cancelListener)
Protected Methods
void onCreate(Bundle savedInstanceState)
Similar to onCreate(Bundle), you should initialized your dialog in this method, including calling setContentView(View).
void onStop()
Called to tell you that you're stopping.
[Expand]
Inherited Methods
From class android.app.AlertDialog
From class android.app.Dialog
From class java.lang.Object
From interface android.content.DialogInterface
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback

Constants

public static final int STYLE_HORIZONTAL

Creates a ProgressDialog with a horizontal progress bar.

Constant Value: 1 (0x00000001)

public static final int STYLE_SPINNER

Creates a ProgressDialog with a ciruclar, spinning progress bar. This is the default.

Constant Value: 0 (0x00000000)

Public Constructors

public ProgressDialog (Context context)

public ProgressDialog (Context context, int theme)

Public Methods

public int getMax ()

public int getProgress ()

public int getSecondaryProgress ()

public void incrementProgressBy (int diff)

public void incrementSecondaryProgressBy (int diff)

public boolean isIndeterminate ()

public void onStart ()

Called when the dialog is starting.

public void setIndeterminate (boolean indeterminate)

public void setIndeterminateDrawable (Drawable d)

public void setMax (int max)

public void setMessage (CharSequence message)

public void setProgress (int value)

public void setProgressDrawable (Drawable d)

public void setProgressStyle (int style)

public void setSecondaryProgress (int secondaryProgress)

public static ProgressDialog show (Context context, CharSequence title, CharSequence message)

public static ProgressDialog show (Context context, CharSequence title, CharSequence message, boolean indeterminate)

public static ProgressDialog show (Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable)

public static ProgressDialog show (Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, DialogInterface.OnCancelListener cancelListener)

Protected Methods

protected void onCreate (Bundle savedInstanceState)

Similar to onCreate(Bundle), you should initialized your dialog in this method, including calling setContentView(View).

Parameters
savedInstanceState If this dialog is being reinitalized after a the hosting activity was previously shut down, holds the result from the most recent call to onSaveInstanceState(), or null if this is the first time.

protected void onStop ()

Called to tell you that you're stopping.