react-native-splash-lottie-android
v1.0.1
Published
A splash screen with Lottie for react-native, hide when application loaded ,it works only on Android.
Downloads
1
Readme
react-native-splash-lottie
Getting started
$ npm install react-native-splash-lottie --save
Mostly automatic installation
$ react-native link react-native-splash-lottie
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.SplashLottiePackage;
to the imports at the top of the file - Add
new SplashLottiePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-splash-lottie' project(':react-native-splash-lottie').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-lottie/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-splash-lottie')
Usage
import SplashLottie from 'react-native-splash-lottie';
// TODO: What to do with the module?
SplashLottie;