-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMyPosts.js
126 lines (119 loc) · 4.59 KB
/
MyPosts.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
import React ,{Component} from 'react';
import { StyleSheet, Text, View, Image,Dimensions, StatusBar, ScrollView,TouchableWithoutFeedback,TouchableOpacity,ImageBackground,Modal,TouchableHighlight } from 'react-native';
import { Header,Icon,SearchBar,Input,Button } from 'react-native-elements';
import Carousel from 'react-native-snap-carousel';
import { createStackNavigator, createAppContainer, createBottomTabNavigator,createMaterialTopTabNavigator } from "react-navigation";
class MyPosts extends React.Component {
static navigationOptions = ({ navigate }) => ({
header: null
})
constructor(props){
super();
}
render() {
const {navigate} = this.props.navigation;
return (
<View>
<Header
leftComponent={<TouchableOpacity onPress={() => navigate('Profile')}><Image source={require('./assets/left-arrow.png')} style={{ width:20, height: 20, tintColor:'white'}}/></TouchableOpacity>}
centerComponent={{ text: '投稿', style: { color: '#fff', fontSize:17,fontWeight:'bold' } }}
rightComponent={{ icon: 'edit', color: '#fff', onPress:() => navigate('Message')}}
containerStyle={{
backgroundColor: 'pink',
justifyContent: 'space-around',
}}
/>
<ScrollView>
<View style={{backgroundColor:'white',flexDirection:'row',alignItems: 'flex-start',flexWrap: 'wrap',zIndex: 1,}}>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
<TouchableWithoutFeedback
onPress={() => navigate('ImageDetail')}>
<Image
source={require('./assets/welcome1.jpg')}
style={{ width: '33%',aspectRatio:1,marginRight:1,marginTop:1 }}/>
</TouchableWithoutFeedback>
</View>
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
welcomeImages:{
height: Dimensions.get('window').height,
width: Dimensions.get('window').width,
resizeMode: 'cover',
zIndex: 0,
position: 'relative',
},
title:{
alignItems: 'center',
justifyContent: 'center',
color: 'pink',
zIndex: 2,
fontSize:40,
position: 'absolute',
textAlign: 'center',
textAlignVertical: "center",
top:'35%',
left:'30%',
// fontFamily:'insta-font'
},
text:{
position: 'absolute',
height: Dimensions.get('window').height,
width: Dimensions.get('window').width,
backgroundColor:'rgba(0,0,0,0.6)',
},
slide:{
backgroundColor:'rgba(0,0,0,0.6)',
},
image:{
resizeMode: 'contain',
},
carousel:{
// borderRadius:10,
},
storyEnd:{
width:100,
height:100,
backgroundColor:"gray"
}
}
);
export default MyPosts;