-
Notifications
You must be signed in to change notification settings - Fork 1
ProgressVectorAlertDialog
Leonardo D. Palma edited this page Jul 4, 2025
·
1 revision
Create and display a progress dialog with a vector animated as loader.
In code:
ProgressVectorAlertDialog.Builder(applicationContext)
.setTitle("Lorem Ipsum")
.setMessage("What is Lorem Ipsum?")
.create()
.show()ProgressVectorAlertDialog offers several attributes for a deeper view configuration, the following table shows all these options and their default value.
| Name | Description | Values | Default | Related method(s) |
|---|---|---|---|---|
| Builder | Creates a builder for an alert dialog that uses the default alert dialog theme | Context |
N/A | Builder() |
| Icon | Set the drawable resource to be used in the icon | Int |
N/A | setIcon() |
| Icon Tint Color | Set background tint for icon |
Int or rgb(R,G,B)
|
N/A | setIconTintColor() |
| Icon Tint Color | Set background tint for icon | IntRes |
N/A | setIconTintColorRes() |
| Icon Animated Vector | Set the animated drawable resource to be used in the icon | Int |
R.drawable.ic_baseline_animated_default |
setIconVectorDrawable() |
| Animated Vector | Set for the animated vector to start its animation | Boolean |
true |
setAnimatedVectorDrawable() |
| Animated Vector Loop | Set animated vector loop | Boolean |
false |
setLoopAnimatedVectorDrawable() |
| Title | Set the title displayed |
String, Int
|
N/A | setTitle() |
| Message | Sets the message to display |
String, Int
|
N/A | setMessage() |
| Timeout | Sets the timeout | Long |
N/A | setTimeout() |
| Cancelable | Sets whether the dialog is cancelable or not | Boolean |
true |
setCancelable() |
| NegativeButton | Set a listener to be invoked when the negative button of the dialog is pressed |
String or Int
|
N/A | setNegativeButton() |
| create | Creates an ProgressVectorAlertDialog with the arguments supplied to this builder | - | - | create() |
| show | Start the dialog and display it on screen | - | - | show() |
If you want to add more functionality to dialog events, you can use the following methods to capture the actions.
- When the
dismissoption is called from the dialog box, you can use thesetOnDismissListenermethod to perform additional actions. - When the
canceloption is called from the dialog box, you can use thesetOnCancelListenermethod to perform additional actions. - When the
showoption is called from the dialog box, you can use thesetOnShowListenermethod to perform additional actions.