MoreAppCell.js
2.43 KB
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
/**
* Created by jone on 2017/4/10.
*/
import React, {Component} from 'react';
import {
View,
Text,
TouchableWithoutFeedback,
StyleSheet,
TouchableOpacity,
Image,
Dimensions,
} from 'react-native';
export default class MoreAppCell extends Component {
constructor(props) {
super(props);
this.images = {
1: require('../../images/mine_setting_app_yohonow.png'),
2: require('../../images/mine_setting_app_yohomars.png'),
}
}
render() {
return (
<View style={styles.container}>
<View style={styles.titleHelighted}>
<Text>更多应用</Text>
</View>
<View style={styles.bottomStyle}>
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.onPressItem && this.props.onPressItem(9)
}
>
<View style={styles.titleNormal}>
<Image source={this.images[1]} style={styles.leftImgStyle}/>
<Text>Yoho!Now</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={0.5}
onPress={
() => this.props.onPressItem && this.props.onPressItem(10)
}
>
<View style={styles.titleNormal}>
<Image source={this.images[2]} style={styles.leftImgStyle}/>
<Text>mars</Text>
</View>
</TouchableOpacity>
</View>
</View>
)
}
};
let {width, height} = Dimensions.get('window');
let styles = StyleSheet.create({
container: {
backgroundColor:'white',
},
bottomStyle: {
backgroundColor:'white',
paddingBottom:10,
// 设置主轴的方向
flexDirection:'row',
alignItems: 'center',
// 设置主轴的对齐方式
justifyContent:'center'
},
leftImgStyle: {
},
titleHelighted: {
marginTop:10,
paddingLeft:10
},
titleNormal: {
width:150,
height:150,
justifyContent:'center',
alignItems:'center'
},
titleSelected: {
},
});