react-native-bootsplash 4.0.0-alpha.0 → 4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +76 -135
- package/RNBootSplash.podspec +1 -1
- package/{ReactNativeBootsplash.res → RNBootsplash.res} +4 -8
- package/android/build.gradle +13 -11
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplash.java +2 -11
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModule.java +79 -198
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashPackage.java +6 -2
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashTask.java +1 -15
- package/bsconfig.json +0 -1
- package/dist/commonjs/generate.js +118 -110
- package/dist/commonjs/generate.js.map +1 -1
- package/dist/commonjs/index.js +5 -19
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/generate.js +114 -107
- package/dist/module/generate.js.map +1 -1
- package/dist/module/index.js +3 -13
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/generate.d.ts +4 -4
- package/dist/typescript/index.d.ts +0 -6
- package/ios/RNBootSplash.h +3 -13
- package/ios/RNBootSplash.m +44 -93
- package/ios/RNBootSplash.xcodeproj/project.pbxproj +2 -2
- package/package.json +21 -23
- package/react-native.config.js +21 -8
- package/src/generate.ts +98 -139
- package/src/index.ts +0 -13
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashDialog.java +0 -36
- package/android/src/main/res/anim/bootsplash_fade_in.xml +0 -7
- package/android/src/main/res/anim/bootsplash_fade_out.xml +0 -7
- package/android/src/main/res/values/styles.xml +0 -13
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -15,31 +15,34 @@ Show a bootsplash during app startup. Hide it when you are ready.
|
|
|
15
15
|
|
|
16
16
|
<p>
|
|
17
17
|
<img height="520" src="https://raw.githubusercontent.com/zoontek/react-native-bootsplash/HEAD/docs/ios_demo.gif?raw=true" alt="iOS demo"></img>
|
|
18
|
-
<img
|
|
18
|
+
<img height="500" src="https://raw.githubusercontent.com/zoontek/react-native-bootsplash/HEAD/docs/android_demo.gif?raw=true" alt="android demo"></img>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
|
+
**⚠️ You are currently reading the 4.x version documentation, which is still in beta.**<br>
|
|
22
|
+
**For the stable version, check the [`3.2.6` tag `README.md`](https://github.com/zoontek/react-native-bootsplash/tree/3.2.6).**
|
|
23
|
+
|
|
24
|
+
**For migration from the v3, check the [`MIGRATION.md` file](https://github.com/zoontek/react-native-bootsplash/blob/master/MIGRATION.md).**
|
|
25
|
+
|
|
21
26
|
## Support
|
|
22
27
|
|
|
23
28
|
| version | react-native version |
|
|
24
29
|
| ------- | -------------------- |
|
|
30
|
+
| 4.0.0+ | 0.65.0+ |
|
|
25
31
|
| 3.0.0+ | 0.63.0+ |
|
|
26
|
-
| 2.0.0+ | 0.60.0+ |
|
|
27
|
-
|
|
28
|
-
For 0.59-, you should use [`jetify -r`](https://github.com/mikehardy/jetifier/blob/master/README.md#to-reverse-jetify--convert-node_modules-dependencies-to-support-libraries)
|
|
29
32
|
|
|
30
33
|
## Installation
|
|
31
34
|
|
|
32
35
|
```bash
|
|
33
|
-
$ npm install --save react-native-bootsplash
|
|
36
|
+
$ npm install --save react-native-bootsplash@next
|
|
34
37
|
# --- or ---
|
|
35
|
-
$ yarn add react-native-bootsplash
|
|
38
|
+
$ yarn add react-native-bootsplash@next
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
Don't forget going into the `ios` directory to execute a `pod install`.
|
|
39
42
|
|
|
40
43
|
## 🆘 Manual linking
|
|
41
44
|
|
|
42
|
-
Because this package targets React Native 0.
|
|
45
|
+
Because this package targets React Native 0.65.0+, you probably don't need to link it manually. But if you have a special case, follow these additional instructions:
|
|
43
46
|
|
|
44
47
|
<details>
|
|
45
48
|
<summary><b>👀 See manual linking instructions</b></summary>
|
|
@@ -118,7 +121,7 @@ Generate a launch screen using an original logo file
|
|
|
118
121
|
|
|
119
122
|
Options:
|
|
120
123
|
--background-color <color> color used as launch screen background (in hexadecimal format) (default: "#fff")
|
|
121
|
-
--logo-width <width> logo width at @1x (in dp - we
|
|
124
|
+
--logo-width <width> logo width at @1x (in dp - we recommend approximately ~100) (default: 100)
|
|
122
125
|
--assets-path [path] path to your static assets directory (useful to require the logo file in JS)
|
|
123
126
|
--flavor <flavor> [android only] flavor build variant (outputs in an android resource directory other than "main")
|
|
124
127
|
-h, --help output usage information
|
|
@@ -139,7 +142,6 @@ yarn react-native generate-bootsplash assets/bootsplash_logo_original.png \
|
|
|
139
142
|
This tool relies on the naming conventions that are used in the `/example` project and will therefore create the following files:
|
|
140
143
|
|
|
141
144
|
```bash
|
|
142
|
-
android/app/src/main/res/drawable/bootsplash.xml
|
|
143
145
|
android/app/src/main/res/values/colors.xml (creation and edition)
|
|
144
146
|
android/app/src/main/res/mipmap-hdpi/bootsplash_logo.png
|
|
145
147
|
android/app/src/main/res/mipmap-mdpi/bootsplash_logo.png
|
|
@@ -198,47 +200,52 @@ Set the `BootSplash.storyboard` as launch screen file:
|
|
|
198
200
|
|
|
199
201
|
### Android
|
|
200
202
|
|
|
201
|
-
1.
|
|
203
|
+
1. As this library only support Android 6+, you probably have to edit your `android/build.gradle` file:
|
|
202
204
|
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
+
```gradle
|
|
206
|
+
buildscript {
|
|
207
|
+
ext {
|
|
208
|
+
buildToolsVersion = "30.0.2"
|
|
209
|
+
minSdkVersion = 23 // <- AndroidX splashscreen has basic support for 21 (only the background color), so 23 is best
|
|
210
|
+
compileSdkVersion = 31 // <- set at least 31
|
|
211
|
+
targetSdkVersion = 31 // <- set at least 31
|
|
205
212
|
|
|
206
|
-
|
|
207
|
-
|
|
213
|
+
// …
|
|
214
|
+
```
|
|
208
215
|
|
|
209
|
-
|
|
216
|
+
2. Then edit your `android/app/build.gradle` file:
|
|
210
217
|
|
|
211
|
-
|
|
218
|
+
```gradle
|
|
219
|
+
dependencies {
|
|
220
|
+
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
221
|
+
//noinspection GradleDynamicVersion
|
|
222
|
+
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
212
223
|
|
|
213
|
-
|
|
214
|
-
protected void onCreate(Bundle savedInstanceState) {
|
|
215
|
-
super.onCreate(savedInstanceState);
|
|
216
|
-
RNBootSplash.init(R.drawable.bootsplash, MainActivity.this); // <- display the generated bootsplash.xml drawable over our MainActivity
|
|
217
|
-
}
|
|
218
|
-
```
|
|
224
|
+
implementation "androidx.core:core-splashscreen:1.0.0-alpha02" // Add this line
|
|
219
225
|
|
|
220
|
-
|
|
226
|
+
// …
|
|
227
|
+
```
|
|
221
228
|
|
|
222
|
-
|
|
229
|
+
3. Edit your `android/app/src/main/res/values/styles.xml` file:
|
|
223
230
|
|
|
224
231
|
```xml
|
|
225
232
|
<resources>
|
|
226
233
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<!-- Your base theme customization -->
|
|
234
|
+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
235
|
+
<!-- Your base theme customization -->
|
|
230
236
|
</style>
|
|
231
237
|
|
|
232
|
-
<!--
|
|
233
|
-
<style name="BootTheme" parent="
|
|
234
|
-
|
|
235
|
-
<item name="
|
|
238
|
+
<!-- BootTheme should inherit from Theme.SplashScreen -->
|
|
239
|
+
<style name="BootTheme" parent="Theme.SplashScreen">
|
|
240
|
+
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
|
|
241
|
+
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
|
|
242
|
+
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
|
236
243
|
</style>
|
|
237
244
|
|
|
238
245
|
</resources>
|
|
239
246
|
```
|
|
240
247
|
|
|
241
|
-
|
|
248
|
+
4. Edit your `android/app/src/main/AndroidManifest.xml` file:
|
|
242
249
|
|
|
243
250
|
```xml
|
|
244
251
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@@ -252,35 +259,47 @@ As Android will not create our main activity before launching the app, we need t
|
|
|
252
259
|
android:icon="@mipmap/ic_launcher"
|
|
253
260
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
254
261
|
android:allowBackup="false"
|
|
255
|
-
android:theme="@style/
|
|
256
|
-
|
|
262
|
+
android:theme="@style/BootTheme"> <!-- Replace @style/AppTheme with @style/BootTheme -->
|
|
257
263
|
<activity
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
android:name=".MainActivity"
|
|
265
|
+
android:label="@string/app_name"
|
|
266
|
+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
|
267
|
+
android:launchMode="singleTask"
|
|
268
|
+
android:windowSoftInputMode="adjustResize"
|
|
269
|
+
android:exported="true"> <!-- Add android:exported="true" -->
|
|
270
|
+
<intent-filter>
|
|
271
|
+
<action android:name="android.intent.action.MAIN" />
|
|
272
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
273
|
+
</intent-filter>
|
|
266
274
|
</activity>
|
|
275
|
+
</application>
|
|
276
|
+
</manifest>
|
|
267
277
|
|
|
268
|
-
|
|
269
|
-
<activity
|
|
270
|
-
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
|
|
271
|
-
android:theme="@style/BootTheme"
|
|
272
|
-
android:launchMode="singleTask">
|
|
273
|
-
<intent-filter>
|
|
274
|
-
<action android:name="android.intent.action.MAIN" />
|
|
275
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
276
|
-
</intent-filter>
|
|
277
|
-
</activity>
|
|
278
|
+
```
|
|
278
279
|
|
|
279
|
-
|
|
280
|
+
5. Finally edit your `android/app/src/main/java/com/yourprojectname/MainActivity.java` file:
|
|
280
281
|
|
|
281
|
-
|
|
282
|
+
```java
|
|
283
|
+
import com.facebook.react.ReactActivity;
|
|
284
|
+
import com.facebook.react.ReactActivityDelegate; // <- add this necessary import
|
|
285
|
+
import com.zoontek.rnbootsplash.RNBootSplash; // <- add this necessary import
|
|
282
286
|
|
|
283
|
-
|
|
287
|
+
public class MainActivity extends ReactActivity {
|
|
288
|
+
|
|
289
|
+
// …
|
|
290
|
+
|
|
291
|
+
@Override
|
|
292
|
+
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
293
|
+
return new ReactActivityDelegate(this, getMainComponentName()) {
|
|
294
|
+
|
|
295
|
+
@Override
|
|
296
|
+
protected void loadApp(String appKey) {
|
|
297
|
+
RNBootSplash.init(MainActivity.this); // <- initialize the splash screen
|
|
298
|
+
super.loadApp(appKey);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
}
|
|
284
303
|
```
|
|
285
304
|
|
|
286
305
|
## API
|
|
@@ -304,25 +323,6 @@ RNBootSplash.hide({ fade: true }); // fade
|
|
|
304
323
|
|
|
305
324
|
---
|
|
306
325
|
|
|
307
|
-
### show()
|
|
308
|
-
|
|
309
|
-
#### Method type
|
|
310
|
-
|
|
311
|
-
```ts
|
|
312
|
-
type show = (config?: { fade?: boolean }) => Promise<void>;
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
#### Usage
|
|
316
|
-
|
|
317
|
-
```js
|
|
318
|
-
import RNBootSplash from "react-native-bootsplash";
|
|
319
|
-
|
|
320
|
-
RNBootSplash.show(); // immediate
|
|
321
|
-
RNBootSplash.show({ fade: true }); // fade
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
326
|
### getVisibilityStatus()
|
|
327
327
|
|
|
328
328
|
#### Method type
|
|
@@ -365,72 +365,15 @@ function App() {
|
|
|
365
365
|
|
|
366
366
|
**🤙 A more complex example is available in the [`/example` folder](example).**
|
|
367
367
|
|
|
368
|
-
## Guides
|
|
369
|
-
|
|
370
|
-
### Handle deep linking (on Android)
|
|
371
|
-
|
|
372
|
-
If you want to correctly handle [deep linking](https://developer.android.com/training/app-links/deep-linking) with this package, you should edit the `android/app/src/main/AndroidManifest.xml` file like this:
|
|
373
|
-
|
|
374
|
-
```xml
|
|
375
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
376
|
-
package="com.rnbootsplashexample">
|
|
377
|
-
|
|
378
|
-
<!-- … -->
|
|
379
|
-
|
|
380
|
-
<application
|
|
381
|
-
android:name=".MainApplication"
|
|
382
|
-
android:label="@string/app_name"
|
|
383
|
-
android:icon="@mipmap/ic_launcher"
|
|
384
|
-
android:roundIcon="@mipmap/ic_launcher_round"
|
|
385
|
-
android:allowBackup="false"
|
|
386
|
-
android:theme="@style/AppTheme">
|
|
387
|
-
|
|
388
|
-
<activity
|
|
389
|
-
android:name=".MainActivity"
|
|
390
|
-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
|
391
|
-
android:label="@string/app_name"
|
|
392
|
-
android:windowSoftInputMode="adjustResize"
|
|
393
|
-
android:exported="true"
|
|
394
|
-
android:launchMode="singleTask">
|
|
395
|
-
<!-- ⚠️ add android:exported="true" and android:launchMode="singleTask" above -->
|
|
396
|
-
<!-- remove the <intent-filter> from .MainActivity -->
|
|
397
|
-
</activity>
|
|
398
|
-
|
|
399
|
-
<activity
|
|
400
|
-
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
|
|
401
|
-
android:theme="@style/BootTheme"
|
|
402
|
-
android:launchMode="singleTask">
|
|
403
|
-
<intent-filter>
|
|
404
|
-
<action android:name="android.intent.action.MAIN" />
|
|
405
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
406
|
-
</intent-filter>
|
|
407
|
-
|
|
408
|
-
<!-- add your deep linking instructions inside the RNBootSplashActivity declaration -->
|
|
409
|
-
<intent-filter>
|
|
410
|
-
<action android:name="android.intent.action.VIEW" />
|
|
411
|
-
<category android:name="android.intent.category.DEFAULT" />
|
|
412
|
-
<category android:name="android.intent.category.BROWSABLE" />
|
|
413
|
-
<data android:scheme="YOUR APP SCHEME" /> <!-- replace this with your custom scheme -->
|
|
414
|
-
</intent-filter>
|
|
415
|
-
</activity>
|
|
416
|
-
|
|
417
|
-
<!-- … -->
|
|
418
|
-
|
|
419
|
-
</application>
|
|
420
|
-
|
|
421
|
-
</manifest>
|
|
422
|
-
```
|
|
423
|
-
|
|
424
368
|
### Testing with Jest
|
|
425
369
|
|
|
426
|
-
Testing code which uses this library
|
|
370
|
+
Testing code which uses this library requires some setup since we need to mock the native methods.
|
|
427
371
|
|
|
428
372
|
To add the mocks, create a file _jest/setup.js_ (or any other file name) containing the following code:
|
|
429
373
|
|
|
430
374
|
```js
|
|
431
375
|
jest.mock("react-native-bootsplash", () => {
|
|
432
376
|
return {
|
|
433
|
-
hide: jest.fn().mockResolvedValueOnce(),
|
|
434
377
|
show: jest.fn().mockResolvedValueOnce(),
|
|
435
378
|
getVisibilityStatus: jest.fn().mockResolvedValue("hidden"),
|
|
436
379
|
};
|
|
@@ -465,8 +408,6 @@ function App() {
|
|
|
465
408
|
|
|
466
409
|
## 🕵️♂️ Comparison with [react-native-splash-screen](https://github.com/crazycodeboy/react-native-splash-screen)
|
|
467
410
|
|
|
468
|
-
- If `react-native-splash-screen` encourages you to display an image over your application, `react-native-bootsplash` way-to-go is to design your launch screen using platforms tools
|
|
469
|
-
|
|
411
|
+
- If `react-native-splash-screen` encourages you to display an image over your application, `react-native-bootsplash` way-to-go is to design your launch screen using platforms tools.
|
|
470
412
|
- It should not prevent you from seeing red screen errors.
|
|
471
|
-
|
|
472
413
|
- Hiding the launch screen is configurable: fade it out or hide it without any animation at all (no fade needed if you want to animate it out!).
|
package/RNBootSplash.podspec
CHANGED
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
s.homepage = package["homepage"]
|
|
13
13
|
|
|
14
|
-
s.platforms = { :ios => "
|
|
14
|
+
s.platforms = { :ios => "11.0" }
|
|
15
15
|
s.requires_arc = true
|
|
16
16
|
|
|
17
17
|
s.source = { :git => package["repository"]["url"], :tag => s.version }
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
type config = {fade: bool}
|
|
2
2
|
|
|
3
|
-
@
|
|
3
|
+
@module("react-native-bootsplash") @scope("default")
|
|
4
4
|
external hide: config => Js.Promise.t<unit> = "hide"
|
|
5
5
|
|
|
6
|
-
@bs.module("react-native-bootsplash") @bs.scope("default")
|
|
7
|
-
external show: config => Js.Promise.t<unit> = "show"
|
|
8
|
-
|
|
9
6
|
// Note that this binding requires BuckleScript >= 8.2.0
|
|
10
7
|
type visibilityStatus = [#visible | #hidden | #transitioning]
|
|
11
8
|
|
|
12
|
-
@
|
|
9
|
+
@module("react-native-bootsplash") @scope("default")
|
|
13
10
|
external getVisibilityStatus: unit => Js.Promise.t<visibilityStatus> = "getVisibilityStatus"
|
|
14
11
|
/*
|
|
15
12
|
## Usage
|
|
16
13
|
|
|
17
14
|
```rescript
|
|
18
|
-
|
|
19
|
-
ReactNativeBootSplash.show({fade: false})->ignore
|
|
15
|
+
RNBootsplash.hide({fade: true})->ignore
|
|
20
16
|
```
|
|
21
17
|
|
|
22
18
|
Or
|
|
23
19
|
|
|
24
20
|
```rescript
|
|
25
|
-
|
|
21
|
+
RNBootsplash.hide({fade: true})->Js.Promise.then_(() => {
|
|
26
22
|
Js.log("RN BootSplash: fading is over")
|
|
27
23
|
Js.Promise.resolve()
|
|
28
24
|
}, _)->Js.Promise.catch(error => {
|
package/android/build.gradle
CHANGED
|
@@ -8,23 +8,23 @@ buildscript {
|
|
|
8
8
|
// module dependency in an application project.
|
|
9
9
|
if (project == rootProject) {
|
|
10
10
|
repositories {
|
|
11
|
-
mavenCentral()
|
|
12
11
|
google()
|
|
12
|
+
mavenCentral()
|
|
13
13
|
}
|
|
14
14
|
dependencies {
|
|
15
|
-
classpath
|
|
15
|
+
classpath("com.android.tools.build:gradle:4.2.2")
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
apply plugin:
|
|
20
|
+
apply plugin: "com.android.library"
|
|
21
21
|
|
|
22
22
|
android {
|
|
23
|
-
compileSdkVersion safeExtGet(
|
|
24
|
-
buildToolsVersion safeExtGet(
|
|
23
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
24
|
+
buildToolsVersion safeExtGet("buildToolsVersion", "30.0.2")
|
|
25
25
|
defaultConfig {
|
|
26
|
-
minSdkVersion safeExtGet(
|
|
27
|
-
targetSdkVersion safeExtGet(
|
|
26
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
27
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
28
28
|
}
|
|
29
29
|
lintOptions {
|
|
30
30
|
abortOnError false
|
|
@@ -32,20 +32,22 @@ android {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
repositories {
|
|
35
|
-
mavenLocal()
|
|
36
35
|
mavenCentral()
|
|
36
|
+
mavenLocal()
|
|
37
37
|
maven {
|
|
38
38
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
39
|
-
url
|
|
39
|
+
url("$rootDir/../node_modules/react-native/android")
|
|
40
40
|
}
|
|
41
41
|
maven {
|
|
42
42
|
// Android JSC is installed from npm
|
|
43
|
-
url
|
|
43
|
+
url("$rootDir/../node_modules/jsc-android/dist")
|
|
44
44
|
}
|
|
45
45
|
google()
|
|
46
|
+
maven { url "https://www.jitpack.io" }
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
dependencies {
|
|
49
50
|
//noinspection GradleDynamicVersion
|
|
50
|
-
implementation
|
|
51
|
+
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
52
|
+
implementation "androidx.core:core-splashscreen:${safeExtGet("androidXSplashScreenVersion", "1.0.0-alpha02")}"
|
|
51
53
|
}
|
|
@@ -2,20 +2,11 @@ package com.zoontek.rnbootsplash;
|
|
|
2
2
|
|
|
3
3
|
import android.app.Activity;
|
|
4
4
|
|
|
5
|
-
import androidx.annotation.ColorRes;
|
|
6
5
|
import androidx.annotation.NonNull;
|
|
7
|
-
import androidx.annotation.StyleRes;
|
|
8
6
|
|
|
9
7
|
public class RNBootSplash {
|
|
10
8
|
|
|
11
|
-
public static void init(@NonNull final Activity activity
|
|
12
|
-
|
|
13
|
-
RNBootSplashModule.init(activity, bootThemeResId, android.R.color.white);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public static void init(@NonNull final Activity activity,
|
|
17
|
-
@StyleRes final int bootThemeResId,
|
|
18
|
-
@ColorRes final int backgroundColorResId) {
|
|
19
|
-
RNBootSplashModule.init(activity, bootThemeResId, backgroundColorResId);
|
|
9
|
+
public static void init(@NonNull final Activity activity) {
|
|
10
|
+
RNBootSplashModule.init(activity);
|
|
20
11
|
}
|
|
21
12
|
}
|