-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.js
100 lines (75 loc) · 1.89 KB
/
Home.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
import React, {
Component
} from 'react';
import {
StyleSheet,
View,
Text,
Image,
TouchableOpacity,
Dimensions
} from 'react-native';
// import PropTypes from 'prop-types';
// import ScreenUtils from '../utils/ScreenUtils';
const { width, height } = Dimensions.get('window');
import Orientation from 'react-native-orientation';
export default class Home extends Component {
constructor(props) {
super(props);
this.state = {
};
}
componentDidMount() {
}
pushTimer=()=>{
this.props.navigation.push("Countdown")
}
pushCustomTimer=()=>{
this.props.navigation.push("CustomTimer")
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity activeOpacity={1} onPress={this.pushTimer}>
<View style={styles.timerView}>
<Text style={styles.textStyle}>{"选择系统时间"}</Text>
</View>
</TouchableOpacity>
<TouchableOpacity activeOpacity={1} onPress={this.pushCustomTimer}>
<View style={styles.timerView}>
<Text style={styles.textStyle}>{"自定义时间"}</Text>
</View>
</TouchableOpacity>
</View>
);
}
};
const styles = StyleSheet.create({
cardItemTimeRemainTxt: {
fontSize: 20,
color: '#ee394b'
},
text: {
fontSize: 30,
color: '#FFF',
marginLeft: 7,
},
container: {
marginTop:100,
alignItems: "center",
flex:1,
},
titileStyle: {
fontSize: 24,
color: "#333333",
marginRight:10,
},
textStyle:{
fontSize: 30,
color: '#999999',
textAlign:"center",
},
timerView:{
marginTop:30
}
});