capacitor-progress-dialog
v0.0.3
Published
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 customizin
Downloads
5
Readme
capacitor-progress-dialog
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.
Install
npm install capacitor-progress-dialog
npx cap sync
Supported Platform
- Android
API
show(...)
Shows the progress dialog
show(options: ProgressDialogOptions) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options
| ProgressDialogOptions |
Returns: Promise<{ value: string; }>
hide()
Hides the progress dialog
hide() => Promise<void>
Interfaces
ProgressDialogOptions
| 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 |
Example
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();
}