public class ProgressDialogDecorator extends AbstractDialogDecorator<ButtonBarDialog> implements ProgressDialogDecorator
| Constructor and Description |
|---|
ProgressDialogDecorator(ButtonBarDialog dialog)
Creates a new decorator, which allows to modify the view hierarchy of a dialog, which is
designed according to Android 5's Material Design guidelines even on pre-Lollipop devices and
allows to indicate a running progress.
|
| Modifier and Type | Method and Description |
|---|---|
void |
adaptProgressBar()
Adapts the dialog's progress bar.
|
int |
getProgressBarColor()
Returns the color of the dialog's progress bar.
|
ProgressDialog.ProgressBarPosition |
getProgressBarPosition()
Returns the position of the dialog's progress bar.
|
int |
getProgressBarSize()
Returns the size of the dialog's progress bar.
|
int |
getProgressBarThickness()
Returns the thickness of the dialog's progress bar.
|
protected void |
onAttach(android.view.View view)
The method, which is invoked, when the decorator is attached to the view hierarchy.
|
protected void |
onDetach()
The method, which is invoked, when the decorator is detached from the view hierarchy.
|
void |
onRestoreInstanceState(android.os.Bundle savedInstanceState)
The method, which is invoked in order to restore the state, which has previously stored
within a bundle.
|
void |
onSaveInstanceState(android.os.Bundle outState)
The method, which is invoked in order to stores the decorator's state.
|
void |
setProgressBarColor(int color)
Sets the color of the dialog's progress bar.
|
void |
setProgressBarPosition(ProgressDialog.ProgressBarPosition position)
Sets the position of the dialog's progress bar.
|
void |
setProgressBarSize(int size)
Sets the size of the dialog's progress bar.
|
void |
setProgressBarThickness(int thickness)
Sets the thickness of the dialog's progress bar.
|
attach, detach, getContext, getDialog, getViewclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContextpublic ProgressDialogDecorator(ButtonBarDialog dialog)
dialog - The dialog, whose view hierarchy should be modified by the decorator, as an instance
of the type ButtonBarDialog. The dialog may not be nullpublic final void adaptProgressBar()
public final int getProgressBarColor()
ProgressDialogDecoratorgetProgressBarColor in interface ProgressDialogDecoratorInteger valuepublic final void setProgressBarColor(int color)
ProgressDialogDecoratorsetProgressBarColor in interface ProgressDialogDecoratorcolor - The color, which should be set, as an Integer valuepublic final int getProgressBarSize()
ProgressDialogDecoratorgetProgressBarSize in interface ProgressDialogDecoratorInteger valuepublic final void setProgressBarSize(int size)
ProgressDialogDecoratorsetProgressBarSize in interface ProgressDialogDecoratorsize - The size, which should be set, in pixels as an Integer value. The size must
be at least 0public final int getProgressBarThickness()
ProgressDialogDecoratorgetProgressBarThickness in interface ProgressDialogDecoratorInteger valuepublic final void setProgressBarThickness(int thickness)
ProgressDialogDecoratorsetProgressBarThickness in interface ProgressDialogDecoratorthickness - The thickness, which should be set, in pixels as an Integer value. The
thickness must be at least 1public final ProgressDialog.ProgressBarPosition getProgressBarPosition()
ProgressDialogDecoratorgetProgressBarPosition in interface ProgressDialogDecoratorProgressDialog.ProgressBarPosition. The position may either be LEFT, TOP,
RIGHT or BOTTOMpublic final void setProgressBarPosition(ProgressDialog.ProgressBarPosition position)
ProgressDialogDecoratorsetProgressBarPosition in interface ProgressDialogDecoratorposition - The position, which should be set, as a value of the enum ProgressDialog.ProgressBarPosition. The position may either be LEFT, TOP,
RIGHT or BOTTOMpublic final void onSaveInstanceState(android.os.Bundle outState)
DialogDecoratoronSaveInstanceState in interface DialogDecoratoroutState - The bundle, the decorator's state should be stored within, as an instance of the
class Bundle. The bundle may not be nullpublic final void onRestoreInstanceState(android.os.Bundle savedInstanceState)
DialogDecoratoronRestoreInstanceState in interface DialogDecoratorsavedInstanceState - The bundle, which has been used to store the state, as an instance of the class
Bundle. The bundle may not be nullprotected final void onAttach(android.view.View view)
AbstractDialogDecoratoronAttach in class AbstractDialogDecorator<ButtonBarDialog>view - The root view of the dialog, which is modified by the decorator, as an instance of
the class View. The view may not be nullprotected final void onDetach()
AbstractDialogDecoratoronDetach in class AbstractDialogDecorator<ButtonBarDialog>