-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
78 lines (69 loc) · 1.35 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
import React from 'react';
import {
StyleSheet,
Text,
View,
Navigator,
StatusBar,
TouchableOpacity
} from 'react-native';
import Main from './screens/Main';
export default class App extends React.Component {
constructor(props) {
super(props);
this.initialRoute = {
index: 0,
display: true,
component: Main,
statusBarHidden: true
}
}
componentDidMount() {
StatusBar.setBarStyle(0);
}
configureScene(route, routeStack) {
return {
...Navigator.SceneConfigs.PushFromRight,
gestures: {}
};
}
routeMapper = {
LeftButton: (route, navigator, index, navState) => null,
RightButton: (route, navigator, index, navState) => null,
Title: (route, navigator, index, navState) => null
};
render(){
return (
<Navigator
initialRoute={this.initialRoute}
configureScene={this.configureScene}
renderScene={(route, navigator) => {
return <route.component navigator={navigator} title={route.title} index={route.index} />
}}
/>
);
}
}
const styles = StyleSheet.create({
container: {
flexGrow:1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
navBar: {
borderBottomWidth: 1,
borderBottomColor: "#ddd",
},
navTitle: {
paddingTop: 10,
fontSize: 18,
fontWeight: "500",
},
navBackBtn: {
paddingTop: 10,
paddingLeft: 10,
fontSize: 18,
color: "#555",
}
});