Java android.app ProgressDialog fields, constructors, methods, implement or subclass

Example usage for Java android.app ProgressDialog fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app ProgressDialog.

The text is from its open source code.

Subclass

android.app.ProgressDialog has subclasses.
Click this link to see all its subclasses.

Field

intSTYLE_SPINNER
Creates a ProgressDialog with a circular, spinning progress bar.
intSTYLE_HORIZONTAL
Creates a ProgressDialog with a horizontal progress bar.

Constructor

ProgressDialog(Context context)
Creates a Progress dialog.
ProgressDialog(Context context, int theme)
Creates a Progress dialog.

Method

voidcancel()
Cancel the dialog.
voiddismiss()
Dismiss this dialog, removing it from the screen.
TfindViewById(@IdRes int id)
Finds the first descendant view with the given ID or null if the ID is invalid (< 0), there is no matching view in the hierarchy, or the dialog has not yet been fully created (for example, via #show() or #create() ).
ButtongetButton(int whichButton)
Gets one of the buttons used in the dialog.
ContextgetContext()
Retrieve the Context this Dialog is running in.
intgetProgress()
Gets the current progress.
WindowgetWindow()
Retrieve the current Window for the activity.
voidhide()
Hide the dialog, but do not dismiss it.
voidincrementProgressBy(int diff)
Increments the current progress value.
booleanisShowing()
booleanrequestWindowFeature(int featureId)
Enable extended window features.
voidsetButton(CharSequence text, Message msg)
voidsetButton(int whichButton, CharSequence text, Message msg)
Set a message to be sent when a button is pressed.
voidsetCancelable(boolean flag)
Sets whether this dialog is cancelable with the KeyEvent#KEYCODE_BACK BACK key.
voidsetCanceledOnTouchOutside(boolean cancel)
Sets whether this dialog is canceled when touched outside the window's bounds.
voidsetContentView(@NonNull View view, @Nullable ViewGroup.LayoutParams params)
Set the screen content to an explicit view.
voidsetContentView(@LayoutRes int layoutResID)
Set the screen content from a layout resource.
voidsetIcon(@DrawableRes int resId)
Set resId to 0 if you don't want an icon.
voidsetIndeterminate(boolean indeterminate)
Change the indeterminate mode for this ProgressDialog.
voidsetInverseBackgroundForced(boolean forceInverseBackground)
voidsetMax(int max)
Sets the maximum allowed progress value.
voidsetMessage(CharSequence message)
voidsetOnCancelListener(@Nullable OnCancelListener listener)
Set a listener to be invoked when the dialog is canceled.
voidsetOnDismissListener(@Nullable OnDismissListener listener)
Set a listener to be invoked when the dialog is dismissed.
voidsetOnKeyListener(@Nullable OnKeyListener onKeyListener)
Sets the callback that will be called if a key is dispatched to the dialog.
voidsetOnShowListener(@Nullable OnShowListener listener)
Sets a listener to be invoked when the dialog is shown.
voidsetOwnerActivity(@NonNull Activity activity)
Sets the Activity that owns this dialog.
voidsetProgress(int value)
Sets the current progress.
voidsetProgressNumberFormat(String format)
Change the format of the small text showing current and maximum units of progress.
voidsetProgressPercentFormat(NumberFormat format)
Change the format of the small text showing the percentage of progress.
voidsetProgressStyle(int style)
Sets the style of this ProgressDialog, either #STYLE_SPINNER or #STYLE_HORIZONTAL .
voidsetSecondaryProgress(int secondaryProgress)
Sets the secondary progress.
voidsetTitle(CharSequence title)
voidshow()
Start the dialog and display it on screen.
ProgressDialogshow(Context context, CharSequence title, CharSequence message, boolean indeterminate)
Creates and shows a ProgressDialog.
ProgressDialogshow(Context context, CharSequence title, CharSequence message)
Creates and shows a ProgressDialog.
ProgressDialogshow(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable)
Creates and shows a ProgressDialog.
ProgressDialogshow(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable, OnCancelListener cancelListener)
Creates and shows a ProgressDialog.