/
webView.js
153 lines (136 loc) · 3.54 KB
/
webView.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
'use strict';
import React from 'react';
import {
Text,
View,
TouchableOpacity,
Animated,
StyleSheet,
Dimensions,
TouchableWithoutFeedback,
Image,
WebView,
Platform,
Button,
} from 'react-native';
const {height, width} = Dimensions.get('window');
var backImg = require('./rg_left.png');
class Webview extends React.Component {
static navigationOptions = ({ navigation, screenProps }) => ({
title: 'GreatGreatGreatGreat',
});
componentDidMount() {
}
componentWillMount() {
}
_onBackPress() {
this.props.onBackPress();
}
render() {
return (
<View style={[styles.container, Platform.OS === 'android' ? {marginTop: 21} : {marginTop: 21}]} visible='hidden'>
<View style={styles.toolbar}>
<TouchableOpacity
style={styles.leftIOSContainer}
onPress={this._onBackPress.bind(this)}
>
<Image
style={styles.leftIOS}
source={backImg}
/>
</TouchableOpacity>
<View style={styles.titleViewIOS}>
<TouchableOpacity style={styles.titleViewIOSClick}>
<Text
style={styles.titleIOS}
>
表情商城
</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.content}>
<Text style={styles.tip}>
Custom emoticons is on going
</Text>
<Text style={styles.tip1}>
If you like this component, a star will be nice, thanks!
</Text>
</View>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
top: 0,
//left: 0,
height: height,
width: width,
backgroundColor: '#f0f0f0',
flex: 1,
zIndex: 10000
},
toolbar: {
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
//height: 58,
//shadowOffset: {width: 0, height: .2,},
//shadowOpacity: .3,
borderBottomWidth: 1,
borderColor: '#eee',
shadowColor: '#555',
flexDirection: 'row',
flexWrap: 'wrap',
zIndex: 10
},
titleIOS: {
textAlign: 'center',
color: '#696969',
fontWeight: 'bold',
fontSize: 20,
},
leftIOSContainer: {
width: 40,
height: 35,
justifyContent: 'center',
},
leftIOS: {
//height: 18,
//width: 24,
marginLeft: 10
},
titleViewIOS: {
flex: 2,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
marginRight: 40
},
titleViewIOSClick: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
width: 120,
height: 40
},
content: {
alignItems: 'center',
height: height,
width: width
},
tip: {
fontSize: 20,
marginTop:30,
},
tip1: {
fontSize: 12,
position: 'absolute',
textAlign: 'center',
width: width,
color: 'red',
bottom: 100,
}
});
export default Webview;