1.0.2 • Published 7 years ago

react-native-dialog-progress v1.0.2

Weekly downloads
11
License
MIT
Repository
github
Last release
7 years ago

react-native-dialog-progress

npm npm npm npm

Installation

First you need to install react-native-dialog:

$ npm install react-native-dialog-progress --save

Installation (Android)

React Native Link

$ react-native link react-native-dialog-progress

Manually

...
include ':react-native-dialog-progress'
project(':react-native-dialog-progress').projectDir = new File(settingsDir, '../node_modules/react-native-dialog-progress/android')
  • In android/app/build.gradle
...
dependencies {
    ...
    compile project(':react-native-dialog-progress')
}
  • register module (in MainApplication.java)
......
import com.dialogprogress.DialogProgressPackage;  // <--- import

......

@Override
protected List<ReactPackage> getPackages() {
   ......
   new DialogProgressPackage(),            // <------ add here
   ......
}

Usage

Show DialogProgress

Example

    import DialogProgress from 'react-native-dialog-progress'
    const options = {
        title:"Loading",
        message:"This is a message!",
        isCancelable:true
    }
    DialogProgress.show(options)

npm.io

Options

NameDescriptionDefault/RequiredType
titletext for the dialog titleundefinedstring
messagetext for the dialog messageundefinedstring
isCancelabletrue if the dialog is cancelable, false otherwisefalsebool

Hide DialogProgress

Example

    import DialogProgress from 'react-native-dialog-progress'

    DialogProgress.hide()

Thanks

License