-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcellInfo.js
67 lines (59 loc) · 1.26 KB
/
cellInfo.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
'use strict';
var React = require('react-native');
var {
Image,
Text,
StyleSheet,
View,
Dimensions,
TouchableHighlight,
TouchableNativeFeedback,
Platform,
} = React;
var imageStyle = {
borderRadius: 2,
backgroundColor: 'black',
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
resizeMode: 'contain',
};
var cellInfo = React.createClass({
render: function(){
var TouchableElement = TouchableHighlight;
if (Platform.OS === 'android') {
TouchableElement = TouchableNativeFeedback;
};
return (
<View style={styles.container}>
<TouchableElement
onPress={()=> this.close()}
>
<Image style={imageStyle} source={{uri:this.props.image}}/>
</TouchableElement>
</View>
);
},
close: function () {
this.props.navigator.pop();
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#F5FCFF',
},
closeButton: {
color: 'white',
borderWidth: 1,
borderColor: 'white',
padding: 8,
borderRadius: 3,
textAlign: 'center',
marginTop: 10,
alignSelf: 'flex-end',
},
});
module.exports = cellInfo;