1.0.4 • Published 4 years ago
react-native-osim-native-dialog v1.0.4
react-native-osim-native-dialog
Getting started
$ npm install react-native-osim-native-dialog --save
Mostly automatic installation
$ react-native link react-native-osim-native-dialog
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNNativeDialogLibraryPackage;
to the imports at the top of the file - Add
new RNNativeDialogLibraryPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-osim-native-dialog' project(':react-native-osim-native-dialog').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-osim-native-dialog/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project(':react-native-osim-native-dialog')
Usage
import RNNativeDialogLibrary from 'react-native-osim-native-dialog';
RNNativeDialogLibrary.show('your message');
RNNativeDialogLibrary.show(String title , String message);
RNNativeDialogLibrary.showErrorMessage(String title , String message)
RNNativeDialogLibrary.showWarningMessage(String title , String message, String confirmTitle);
RNNativeDialogLibrary.showSuccessMessage(String title , String message);
RNNativeDialogLibrary.showConfirmMessage(String title , String message, String confirmTitle , String cancelTitle)