|
@@ -26,8 +26,8 @@ class ContentMessageTabItemView extends Component { |
|
@@ -26,8 +26,8 @@ class ContentMessageTabItemView extends Component { |
26
|
onImageLayout(event) {
|
26
|
onImageLayout(event) {
|
27
|
let imageLayout = event.nativeEvent.layout
|
27
|
let imageLayout = event.nativeEvent.layout
|
28
|
this.setState({
|
28
|
this.setState({
|
29
|
- badgeY: imageLayout.y + 1,
|
|
|
30
|
- badgeX: imageLayout.x + imageLayout.width / 2 + 14,
|
29
|
+ badgeY: imageLayout.y - 4,
|
|
|
30
|
+ badgeX: imageLayout.x + imageLayout.width / 2 + 17,
|
31
|
})
|
31
|
})
|
32
|
}
|
32
|
}
|
33
|
|
33
|
|
|
@@ -49,7 +49,7 @@ class ContentMessageTabItemView extends Component { |
|
@@ -49,7 +49,7 @@ class ContentMessageTabItemView extends Component { |
49
|
return <View style={styles.surfaceContainer}>
|
49
|
return <View style={styles.surfaceContainer}>
|
50
|
<Surface width={width} height={height}>
|
50
|
<Surface width={width} height={height}>
|
51
|
<Group>
|
51
|
<Group>
|
52
|
- <Shape d={path} stroke={'white'} fill={'#CE0824'} strokeWidth={strokeWidth}/>
|
52
|
+ <Shape d={path} stroke={'#FB2330'} fill={'#FB2330'} strokeWidth={strokeWidth}/>
|
53
|
</Group>
|
53
|
</Group>
|
54
|
</Surface>
|
54
|
</Surface>
|
55
|
</View>
|
55
|
</View>
|
|
@@ -59,9 +59,7 @@ class ContentMessageTabItemView extends Component { |
|
@@ -59,9 +59,7 @@ class ContentMessageTabItemView extends Component { |
59
|
|
59
|
|
60
|
render() {
|
60
|
render() {
|
61
|
return <View style={[styles.container, this.props.style]}>
|
61
|
return <View style={[styles.container, this.props.style]}>
|
62
|
- <YH_Image style={styles.icon}
|
|
|
63
|
- onLayout={this.onImageLayout}
|
|
|
64
|
- url={YH_Image.getSlicedUrl(this.props.icon, IMAGE_WIDTH, IMAGE_HEIGHT, 2)}/>
|
62
|
+ <Image style={styles.icon} source={this.props.icon} onLayout={this.onImageLayout}/>
|
65
|
<Text style={styles.title}>{this.props.title}</Text>
|
63
|
<Text style={styles.title}>{this.props.title}</Text>
|
66
|
{this.props.badge > 0 && this.state.badgeX != INVALID_POSITION && this.state.badgeY != INVALID_POSITION &&
|
64
|
{this.props.badge > 0 && this.state.badgeX != INVALID_POSITION && this.state.badgeY != INVALID_POSITION &&
|
67
|
<View style={[styles.badgeContainer, {left: this.state.badgeX, top: this.state.badgeY}]}
|
65
|
<View style={[styles.badgeContainer, {left: this.state.badgeX, top: this.state.badgeY}]}
|
|
@@ -108,7 +106,7 @@ let styles = StyleSheet.create({ |
|
@@ -108,7 +106,7 @@ let styles = StyleSheet.create({ |
108
|
left: 0,
|
106
|
left: 0,
|
109
|
top: 0,
|
107
|
top: 0,
|
110
|
right: 0,
|
108
|
right: 0,
|
111
|
- bottom: 0
|
109
|
+ bottom: 0,
|
112
|
},
|
110
|
},
|
113
|
badgeTitle: {
|
111
|
badgeTitle: {
|
114
|
marginLeft: 5,
|
112
|
marginLeft: 5,
|