-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMainScreen.js
60 lines (52 loc) · 1.49 KB
/
MainScreen.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
'use strict';
var React = require('react-native');
var {
Image,
StyleSheet,
Text,
View,
ScrollView,
Dimensions,
} = React;
var ScrollableTabView = require('react-native-scrollable-tab-view');
var deviceWidth = Dimensions.get('window').width; //todo 没有绑定屏幕旋转事件
var IndexList = require('./IndexList');
var MeScreen = require("./MeScreen");
var MainScreen = React.createClass({
render(){
var navigationView = (
<View style={{flex: 1, backgroundColor: '#fff'}}>
<Text style={{margin: 10, fontSize: 15, textAlign: 'left'}}>I'm in the Drawer!</Text>
</View>
);
return (
<View style={styles.container}>
<ScrollableTabView locked={true} >
<IndexList tabLabel="首页" style={styles.tabView} navigator={this.props.navigator} />
<ScrollView tabLabel="原创" style={styles.tabView}>
<View style={styles.card}>
<Text>Flow</Text>
</View>
</ScrollView>
<ScrollView tabLabel="认领" style={styles.tabView}>
<View style={styles.card}>
<Text>Jest</Text>
</View>
</ScrollView>
<MeScreen tabLabel="我" style={styles.tabView} navigator={this.props.navigator} />
</ScrollableTabView>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
},
tabView: {
width: deviceWidth,
padding: 10,
backgroundColor: 'rgba(0,0,0,0.01)',
},
});
module.exports = MainScreen;