-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
181 lines (157 loc) · 5.63 KB
/
App.js
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
//import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { Dimension, SafeAreaView, StyleSheet, Text, TouchableWithoutFeedback,
Platform, StatusBar, TouchableNativeFeedback, TouchableHighlight,
TouchableOpacity, View, Image, Button, Alert, Dimensions
} from 'react-native';
import { useDimensions, useDeviceOrientation
} from "@react-native-community/hooks";
import WelcomeScreen from './app/Screens/WelcomeScreen';
import ViewImageScreen from './app/Screens/ViewImageScreen';
//can write like onPress={handlePress} or/ onPress={()=>console.log("Text Tapped")}
// const handlePress = () => console.log("Text pressed");
// The <Text></Test> below list the type of image and effect when tapped
// {/* <Text numberOfLines={0}>
// Finally, i can use thngrain hoyaaaa yeeee wohoooo what i am doing now i want to ply game me so dasdsadddd why this world so triing aiyoooooo what happen o poor meup!
// </Text>
// {/* <TouchableOpacity onPress={() => console.log("Image Tapped")}> */}
// {/* <TouchableHighlight onPress={() => console.log("ImageTapped")}> */}
// {/* <Image
// blurRadius={0.5}
// //only for android 1000=1second
// fadeDuration={0}
// source={{
// width: 200,
// height: 300,
// uri: "http://picsum.photos/200/300"}} /> */
// // </TouchableOpacity>
// // </TouchableHighlight>
// }
// {/* <TouchableNativeFeedback onPress={() => console.log("ImageTapped")}>
// <View style={{width:200, height:70, backgroundColor: "dodgerblue"}}/>
// </TouchableNativeFeedback> */}
//SafeAreaView is View, can have array like style={[a,b,c]}
//const is like a func, or to declare something
//<SafeAreaView style={[styles.container, containerStyle]}></SafeAreaView>
//const containerStyle = {backgroundColor: "black"};
//How to use Button, 2type of alert msg can be used
// <Button
// color="orange"
// title="Click Me"
// onPress={() => console.log("ButtonTapped")
//first type
// Alert,prompt only works in IOS
// Alert.prompt("My Title", "My Message", text => console.log(text))
//second type
// Alert.alert("My Title", "My message",
// [
// {text: "Yes", onPress:() => console.log("YES!")},
// {text: "No", onPress:() => console.log("NO!")},
// ])
// }
// />
//This is to show how to rotate screen and change the size of the image
//when screen rotated
// const {landscape} = useDeviceOrientation();
// return (
// //SafeAreaView only for IOS
// <SafeAreaView style={styles.container}>
// <View style={{
// backgroundColor:"dodgerblue",
// width: '100%',
// height: landscape ? "100%" : "30%",
// }}>
// </View>
// </SafeAreaView>
// )
//This is how you can play with the alignment
// <View
// style={{
// backgroundColor: "#fff",
// flew: 1,
// flexDirection: "row",
// justifyContent: "center",
// alignItems: "center",
// alignContent: "center",
// flexWrap: "wrap",
// }}>
// <View
// style={{
// backgroundColor: "dodgerblue",
// width: 100,
// height: 300,
// }} />
// <View
// style={{
// backgroundColor: "tomato",
// width: 100,
// height: 100,
// }} />
// <View
// style={{
// backgroundColor: "gold",
// width: 100,
// height: 100,
// }} />
// <View
// style={{
// backgroundColor: "grey",
// width: 100,
// height: 100,
// }} />
// <View
// style={{
// backgroundColor: "black",
// width: 100,
// height: 100,
// }} />
// </View>
//This is how you play with the style and alignment
// <View
// style={{
// backgroundColor: "#fff",
// flex: 1,
// flexDirection: "row",
// justifyContent: "center",
// alignItems: "center",
// alignContent: "center",
//flexWrap: "wrap", //to fix the shape or box in a area.
//like i could more the shape to left and right but not up and down
// }}>
// <View
// style={{
// backgroundColor: "dodgerblue",
// width: 100,
// height: 100,
// }} />
// <View
// style={{
// backgroundColor: "tomato",
// width: 100,
// height: 100,
// bottom: 20,
// left: 20,
// position: "relative",
// }} />
// <View
// style={{
// backgroundColor: "gold",
// width: 100,
// height: 100,
// }} />
// </View>
export default function App() {
return (
<WelcomeScreen/>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
// alignItems: 'center',
// justifyContent: 'center',
//For android
// paddingTop: Platform.OS = "android" ? StatusBar.currentHeight : 0 ,
},
});