forked from sdp-tech/UPCY_Mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdp-tech#83 feat: set splash screen with lottieView
- Loading branch information
1 parent
da994b7
commit 7279c21
Showing
6 changed files
with
89 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"nm":"Happy face","ddd":0,"h":300,"w":279,"meta":{"g":"LottieFiles Figma v62"},"layers":[{"ty":4,"nm":"Ellipse 2","sr":1,"st":0,"op":163,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[27.09,44.5],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,27.71],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[27.09,44.5],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,27.71],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[43.5,44.5],"t":144},{"s":[43.5,44.5],"t":162}]},"s":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100,100],"t":144},{"s":[100,100],"t":162}]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[138.09,149.5],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,132.71],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[155.91,149.5],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,166.29],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[139.5,149.5],"t":144},{"s":[139.5,149.5],"t":162}]},"r":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0],"t":144},{"s":[0],"t":162}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":144},{"s":[100],"t":162}]}},"shapes":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[43.5,44.5],[43.5,89],[0,44.5],[43.5,0],[43.5,44.5]]}],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,44.5],[0,44.5],[43.5,0],[87,44.5]]}],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[54.18,44.5],[10.68,89],[10.68,44.5],[10.68,0],[54.18,44.5]]}],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,10.92],[43.5,55.42],[0,10.92],[43.5,10.92],[87,10.92]]}],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":144},{"s":[{"c":true,"i":[[0,0],[24.02,0],[0,24.58],[-24.02,0],[0,-24.58]],"o":[[0,24.58],[-24.02,0],[0,-24.58],[24.02,0],[0,0]],"v":[[87,44.5],[43.5,89],[0,44.5],[43.5,0],[87,44.5]]}],"t":162}]}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0,0,0,1],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.0448,0.9952,0.0765,1],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.1701,0.9699,0.1968,1],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.3137,0.7569,0.3294,1],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.3167,0.1701,0.9699,1],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.1451,0,0.7686,1],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.3167,0.1701,0.9699,1],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0.2392,0.2824,0.3255,1],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[0,0.4,0,1],"t":144},{"s":[0,0,0,1],"t":162}]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":0},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":18},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":36},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":54},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":72},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":90},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":108},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":126},{"o":{"x":0.33,"y":1},"i":{"x":0.68,"y":1},"s":[100],"t":144},{"s":[100],"t":162}]}}],"ind":1}],"v":"5.7.0","fr":60,"op":162,"ip":0,"assets":[]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
import React from 'react'; | ||
import LottieView from 'lottie-react-native'; | ||
import { Dimensions, View } from 'react-native'; | ||
import { PURPLE } from '../styles/GlobalColor'; | ||
|
||
const SplashScreen = () => { | ||
return <LottieView />; | ||
const SplashScreen = ({ onFinish }: { onFinish: () => void }) => { | ||
const { width, height } = Dimensions.get('screen'); | ||
|
||
return ( | ||
<View | ||
style={{ | ||
height: height, | ||
width: width, | ||
backgroundColor: PURPLE, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}}> | ||
<View | ||
style={{ | ||
width: '90%', | ||
height: '80%', | ||
}}> | ||
<LottieView | ||
source={require('../assets/common/lottie/animation/SplashAnimation.json')} | ||
onAnimationFinish={onFinish} | ||
loop={false} | ||
autoPlay | ||
/> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
export default SplashScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3686,6 +3686,11 @@ decode-uri-component@^0.2.2: | |
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" | ||
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== | ||
|
||
dedent@^0.6.0: | ||
version "0.6.0" | ||
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.6.0.tgz#0e6da8f0ce52838ef5cec5c8f9396b0c1b64a3cb" | ||
integrity sha512-cSfRWjXJtZQeRuZGVvDrJroCR5V2UvBNUMHsPCdNYzuAG8b9V8aAy3KUcdQrGQPXs17Y+ojbPh1aOCplg9YR9g== | ||
|
||
dedent@^1.0.0: | ||
version "1.5.3" | ||
resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" | ||
|
@@ -4936,7 +4941,7 @@ internal-slot@^1.0.4, internal-slot@^1.0.7: | |
hasown "^2.0.0" | ||
side-channel "^1.0.4" | ||
|
||
[email protected], invariant@^2.2.4: | ||
[email protected], invariant@^2.2.2, invariant@^2.2.4: | ||
version "2.2.4" | ||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" | ||
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== | ||
|
@@ -5901,10 +5906,18 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: | |
dependencies: | ||
js-tokens "^3.0.0 || ^4.0.0" | ||
|
||
lottie-react-native@^6.7.2: | ||
version "6.7.2" | ||
resolved "https://registry.yarnpkg.com/lottie-react-native/-/lottie-react-native-6.7.2.tgz#615fc16f88970fcbdf63699537f499b5937afe8a" | ||
integrity sha512-MZVx6N1EeO/EaSx8T44mJ0aHc5Mqee+xIfWwszni0oz8U2wlHdaWGjES44dHxaxgAp/0dRaFt3PkpZ6egTzcBg== | ||
[email protected]: | ||
version "3.4.0" | ||
resolved "https://registry.yarnpkg.com/lottie-ios/-/lottie-ios-3.4.0.tgz#a23be299760aefb44298b9cb5f60df489030adbf" | ||
integrity sha512-qnV8UrawwnBRf5V0no2yxlPUE69vzfFqpxEEXGTZhb1/WX1xewqVNYvtbguqwQkdu9IT9D5WC1U9CHZ1KbkGDw== | ||
|
||
[email protected]: | ||
version "5.1.5" | ||
resolved "https://registry.yarnpkg.com/lottie-react-native/-/lottie-react-native-5.1.5.tgz#6696fb95773639d04bbba332d753ab69669bccd0" | ||
integrity sha512-xl6uEo50joQeIqso5SvPKt1uGBqMhgNgs+36S4725Nfigf4zAY23/I9QEEkJF+1BHq7wKCeYha2KafLTm20gqA== | ||
dependencies: | ||
invariant "^2.2.2" | ||
react-native-safe-modules "^1.0.3" | ||
|
||
lower-case@^2.0.2: | ||
version "2.0.2" | ||
|
@@ -6945,6 +6958,13 @@ react-native-safe-area-context@^4.8.2: | |
resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.10.7.tgz#91d04e510bf96e3c38bec2beb7ae37347522a503" | ||
integrity sha512-Lq+gtuIF28mMtBacFchGpO1KHMTvzeb3ji1HAVnMTPe3qWR46Tb4AlztZTvTwUnpZ8JVaC9sKXnJHKmuaIQwXA== | ||
|
||
react-native-safe-modules@^1.0.3: | ||
version "1.0.3" | ||
resolved "https://registry.yarnpkg.com/react-native-safe-modules/-/react-native-safe-modules-1.0.3.tgz#f5f29bb9d09d17581193843d4173ad3054f74890" | ||
integrity sha512-DUxti4Z+AgJ/ZsO5U7p3uSCUBko8JT8GvFlCeOXk9bMd+4qjpoDvMYpfbixXKgL88M+HwmU/KI1YFN6gsQZyBA== | ||
dependencies: | ||
dedent "^0.6.0" | ||
|
||
react-native-safearea-height@^1.0.6: | ||
version "1.0.6" | ||
resolved "https://registry.yarnpkg.com/react-native-safearea-height/-/react-native-safearea-height-1.0.6.tgz#ece54ae953ff08efe9eee7aa96581a3a9e76c930" | ||
|