-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.js
87 lines (82 loc) · 3.34 KB
/
image.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
/**
* 模仿美团首页顶部分类效果
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, {
Component,
} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
} from 'react-native';
class TestImage extends Component {
render() {
return (
<View>
<Image source={require('./img/bugs.jpg')}/>
<Image
source={{uri:'http://mta.zttit.com:8080/images/ZTT_1404756641470_image.jpg'}}
style={{width:100,height:100}}/>
<View style={{marginLeft:5,marginTop:10,marginRight:5}}>
<View style={{flexDirection:'row'}}>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text style={{marginTop:5,textAlign:'center',fontSize:11,color:'#555555'}}>美食</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>电影</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>酒店</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>KTV</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>外卖</Text>
</View>
</View>
<View style={{flexDirection:'row',marginTop:10}}>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text style={{marginTop:5,textAlign:'center',fontSize:11,color:'#555555'}}>优惠买单</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>周边游</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>休闲娱乐</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>今日新单</Text>
</View>
<View style={{width:70}}>
<Image source={require('./img/wait.png')} style={{alignSelf:'center',width:45,height:45}}/>
<Text
style={{marginTop:5,alignSelf:'center',fontSize:11,color:'#555555',textAlign:'center'}}>丽人</Text>
</View>
</View>
</View>
</View>
);
}
}
AppRegistry.registerComponent('TestImage', () => TestImage);