A Capacitor plugin for Android progress dialog allows developers to easily display a progress dialog in their Ionic apps when performing long-running tasks. The plugin provides a simple API for showing and hiding the progress dialog, as well as customizing its appearance and behavior.
npm install capacitor-progress-dialog
npx cap sync
- Android
Shows the progress dialog
show(options: ProgressDialogOptions) => Promise<{ value: string; }>
Param | Type |
---|---|
options |
ProgressDialogOptions |
Returns: Promise<{ value: string; }>
Hides the progress dialog
hide() => Promise<void>
Prop | Type | Description |
---|---|---|
title |
string |
Title of the progress dialog |
message |
string |
Message of the progress dialog |
cancelable |
boolean |
Set to true for cancelable dialog |
spinnerColor |
string |
Color of the spinner in HEX string |
textColor |
string |
Color of the text in HEX string |
backgroundColor |
string |
Color of the background in HEX string |
import { ProgressDialog } from 'capacitor-progress-dialog';
async showLoading() {
await ProgressDialog.show({
title: "Downloading",
message: "Please Wait..",
spinnerColor: "#f04141",
textColor: "#ffffff",
backgroundColor: "#1d1d1d",
cancelable: true,
});
}
async hideLoading() {
await ProgressDialog.hide();
}