react-native-bootsplash 7.2.0 → 7.3.1
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/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeRNBootSplashSpec.java +78 -0
- package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +36 -0
- package/android/app/build/generated/source/codegen/jni/RNBootSplashSpec-generated.cpp +44 -0
- package/android/app/build/generated/source/codegen/jni/RNBootSplashSpec.h +31 -0
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBootSplashSpec/RNBootSplashSpecJSI-generated.cpp +39 -0
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNBootSplashSpec/RNBootSplashSpecJSI.h +85 -0
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplash.kt +0 -1
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModuleImpl.kt +84 -104
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashPackage.kt +6 -15
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashView.kt +50 -0
- package/android/src/main/res/values/styles.xml +0 -10
- package/dist/commonjs/extras/addon/index.js +31 -31
- package/dist/commonjs/extras/addon/index.js.map +1 -1
- package/dist/commonjs/extras/utils.js +10 -9
- package/dist/commonjs/extras/utils.js.map +1 -1
- package/dist/commonjs/index.js +7 -3
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/extras/addon/index.js +31 -31
- package/dist/module/extras/addon/index.js.map +1 -1
- package/dist/module/extras/utils.js +10 -9
- package/dist/module/extras/utils.js.map +1 -1
- package/dist/module/index.js +8 -4
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/extras/addon/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/extras/utils.d.ts +2 -0
- package/dist/typescript/commonjs/extras/utils.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/extras/addon/index.d.ts.map +1 -1
- package/dist/typescript/module/extras/utils.d.ts +2 -0
- package/dist/typescript/module/extras/utils.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/ios/RNBootSplash.xcodeproj/project.xcworkspace/xcuserdata/zoontek.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNBootSplash.xcodeproj/xcuserdata/zoontek.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/package.json +8 -8
- package/src/extras/utils.ts +12 -12
- package/src/index.ts +6 -3
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashDialog.kt +0 -79
- package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashQueue.kt +0 -26
- package/android/src/main/res/anim/bootsplash_fade_out.xml +0 -6
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
package com.zoontek.rnbootsplash
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import android.app.Dialog
|
|
5
|
-
import android.os.Bundle
|
|
6
|
-
import android.view.WindowManager
|
|
7
|
-
|
|
8
|
-
import androidx.annotation.StyleRes
|
|
9
|
-
|
|
10
|
-
class RNBootSplashDialog(
|
|
11
|
-
activity: Activity,
|
|
12
|
-
@StyleRes themeResId: Int,
|
|
13
|
-
private val fade: Boolean
|
|
14
|
-
) : Dialog(activity, themeResId) {
|
|
15
|
-
|
|
16
|
-
init {
|
|
17
|
-
setOwnerActivity(activity)
|
|
18
|
-
setCancelable(false)
|
|
19
|
-
setCanceledOnTouchOutside(false)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Deprecated("Deprecated in favor of OnBackPressedCallback")
|
|
23
|
-
override fun onBackPressed() {
|
|
24
|
-
val activity = ownerActivity
|
|
25
|
-
activity?.moveTaskToBack(true)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
override fun dismiss() {
|
|
29
|
-
if (isShowing) {
|
|
30
|
-
runCatching { super.dismiss() }
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
fun dismiss(callback: () -> Unit) {
|
|
35
|
-
if (isShowing) {
|
|
36
|
-
setOnDismissListener { callback() }
|
|
37
|
-
runCatching { super.dismiss() }.onFailure { callback() }
|
|
38
|
-
} else {
|
|
39
|
-
callback()
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
override fun show() {
|
|
44
|
-
if (!isShowing) {
|
|
45
|
-
runCatching { super.show() }
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
fun show(callback: () -> Unit) {
|
|
50
|
-
if (!isShowing) {
|
|
51
|
-
setOnShowListener { callback() }
|
|
52
|
-
runCatching { super.show() }.onFailure { callback() }
|
|
53
|
-
} else {
|
|
54
|
-
callback()
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
override fun onCreate(savedInstanceState: Bundle?) {
|
|
59
|
-
window?.apply {
|
|
60
|
-
setLayout(
|
|
61
|
-
WindowManager.LayoutParams.MATCH_PARENT,
|
|
62
|
-
WindowManager.LayoutParams.MATCH_PARENT
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
setWindowAnimations(
|
|
66
|
-
when {
|
|
67
|
-
fade -> R.style.BootSplashFadeOutAnimation
|
|
68
|
-
else -> R.style.BootSplashNoAnimation
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
if (RNBootSplashModuleImpl.isSamsungOneUI4()) {
|
|
73
|
-
setBackgroundDrawableResource(R.drawable.compat_splash_screen_oneui_4)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
super.onCreate(savedInstanceState)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
package com.zoontek.rnbootsplash
|
|
2
|
-
|
|
3
|
-
import java.util.Vector
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Represents a first-in-first-out (FIFO) thread safe queue of objects.
|
|
7
|
-
* Its source code is based on Java internal `Stack`.
|
|
8
|
-
*/
|
|
9
|
-
class RNBootSplashQueue<E> : Vector<E>() {
|
|
10
|
-
|
|
11
|
-
@Synchronized
|
|
12
|
-
fun shift(): E? {
|
|
13
|
-
if (isEmpty()) {
|
|
14
|
-
return null
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
val item = elementAt(0)
|
|
18
|
-
removeElementAt(0)
|
|
19
|
-
|
|
20
|
-
return item
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
fun push(item: E) {
|
|
24
|
-
addElement(item)
|
|
25
|
-
}
|
|
26
|
-
}
|