-
Notifications
You must be signed in to change notification settings - Fork 3
/
search.js
83 lines (78 loc) · 1.84 KB
/
search.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
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
PixelRatio,
Image,
View,
TextInput,
} from 'react-native';
class Search extends Component {
render() {
return (
<View style={styles.sub_searchView}>
<View style={styles.searchBarView}>
<Image source={require('./imgs/search_icon.png')}
style={{height:18,width:18,alignSelf:'center',marginLeft:5} } />
<TextInput
autoCapitalize="none"
autoCorrect={false}
placeholder="搜索:目的地/景点/酒店/关键字/航班号"
style={styles.searchBarInput}
/>
<Image source={require('./imgs/voice_icon.png')}
style={{height:18,width:18,alignSelf:'center',marginLeft:0} } />
</View>
<View style={styles.messageView}>
<Image source={require('./imgs/message_icon.png')}
style={{height:22,width:22} } />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
sub_searchView: {
marginTop:0,
height: 45,
backgroundColor: '#F6F6F6',
flexDirection: 'row',
},
searchBarView:{
height: 30,
width: 292,
marginLeft: 10,
flexDirection: 'row',
borderWidth: 1,
alignItems: 'center',
borderColor: 'lightgray',
marginTop: 8,
borderRadius: 3,
backgroundColor:'white',
},
searchBarInput: {
fontSize: 14,
flex: 1,
height: 40,
alignSelf: 'center',
},
messageView:{
borderRadius:3,
borderColor:'lightgray',
borderWidth:1,
width: 40,
height: 30,
marginLeft: 10,
marginTop: 8,
backgroundColor: 'white',
alignItems: 'center',
justifyContent: 'center',
},
});
module.exports= Search;