-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSplashScreen.js
More file actions
50 lines (45 loc) · 1.12 KB
/
SplashScreen.js
File metadata and controls
50 lines (45 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from "react";
import { View, StyleSheet, Image, Text, Dimensions } from "react-native";
import LottieView from "lottie-react-native";
const { width } = Dimensions.get("window");
const SplashScreen = () => {
return (
<View style={styles.container} className="bg-violet-800">
<View style={styles.textContainer}>
<Image
source={require("./assets/tmdb.png")}
className="w-[226] h-[160] self-center"
/>
</View>
<View style={styles.animationContainer}>
<LottieView
source={require("./assets/swingingBall.json")}
autoPlay
loop
//style={styles.animation}
className="w-full h-full"
/>
</View>
</View>
);
};
export default SplashScreen;
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
},
textContainer: {
marginBottom: 16,
width: "100%",
},
animationContainer: {
width: width * 0.6,
aspectRatio: 1, // Maintain aspect ratio of the animation
},
animation: {
width: "100%",
height: "100%",
},
});