-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome page
88 lines (80 loc) · 2.94 KB
/
Home page
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
import * as React from "react"
import { View, Image, ViewStyle, TextStyle, ImageStyle, SafeAreaView, TouchableNativeFeedback, StyleSheet } from "react-native"
import { NavigationInjectedProps } from "react-navigation"
import { Button, Header, Screen, Text, Wallpaper } from "../../components"
import { color, spacing } from "../../theme"
const bowserLogo = require("./bowser.png")
//create a style sheet that allows for more code readbility
const styles = StyleSheet.create({
healthSect: {
flex: 3,
height: 50,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'palegreen',
},
feedSect: {
flex: 3,
height: 50,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'orange',
},
sleepSect: {
flex: 3,
height: 50,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'skyblue',
},
toiletSect: {
flex: 3,
height: 50,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'palegoldenrod',
},
});
export interface WelcomeScreenProps extends NavigationInjectedProps<{}> {}
export const WelcomeScreen: React.FunctionComponent<WelcomeScreenProps> = props => {
const nextScreen = React.useMemo(() => () => props.navigation.navigate("demo"), [
props.navigation,
])
return (
// May remove the 'row' portion for view preference
// TouchableNativeFeedback *creates touchable button that uses Native Feedback from ***android OS ONLY***
<View style={{flex: 1}}>
<View style = {{flex:1, alignItems: 'center', justifyContent: 'center', backgroundColor: 'violet'}}>
<Text style = {{color: 'black'}}> Please Select An Option For Tracking</Text>
</View>
<TouchableNativeFeedback
onPress={nextScreen}
background={Platform.OS === 'android' ? TouchableNativeFeedback.SelectableBackground() : ''}>
<View style={styles.healthSect}>
<Text style = {{color: 'black'}}>Health {Platform.OS !== 'android' ? '(Android only)' : ''}</Text>
</View>
</TouchableNativeFeedback>
<TouchableNativeFeedback
onPress={nextScreen}
background={Platform.OS === 'android' ? TouchableNativeFeedback.SelectableBackground() : ''}>
<View style={styles.feedSect}>
<Text style = {{color: 'black'}}>Feeding {Platform.OS !== 'android' ? '(Android only)' : ''}</Text>
</View>
</TouchableNativeFeedback>
<TouchableNativeFeedback
onPress={nextScreen}
background={Platform.OS === 'android' ? TouchableNativeFeedback.SelectableBackground() : ''}>
<View style={styles.sleepSect}>
<Text style = {{color: 'black'}}>Sleep {Platform.OS !== 'android' ? '(Android only)' : ''}</Text>
</View>
</TouchableNativeFeedback>
<TouchableNativeFeedback
onPress={nextScreen}
background={Platform.OS === 'android' ? TouchableNativeFeedback.SelectableBackground() : ''}>
<View style={styles.toiletSect}>
<Text style = {{color: 'black'}}>Toilet {Platform.OS !== 'android' ? '(Android only)' : ''}</Text>
</View>
</TouchableNativeFeedback>
</View>
);
}