Authored by 盖剑秋

Fix few UI issues of new classify. reivewed by lu liang.

... ... @@ -299,6 +299,8 @@ export default class CategoryBList extends Component {
let {width, height} = Dimensions.get('window');
const DEVICE_WIDTH_RATIO = width / 375;
let cellWidth = 78 * DEVICE_WIDTH_RATIO;
let cellPadding = ((width - 102.5 * DEVICE_WIDTH_RATIO) - cellWidth * 3) / 4;
let styles = StyleSheet.create({
container: {
... ... @@ -342,12 +344,10 @@ let styles = StyleSheet.create({
textAlign: 'center'
},
banner: {
width: 234 * DEVICE_WIDTH_RATIO,
height: 73 * DEVICE_WIDTH_RATIO,
width: width - 102.5 * DEVICE_WIDTH_RATIO - cellPadding*2,
height: 86 * DEVICE_WIDTH_RATIO,
backgroundColor: '#ffffff',
marginLeft: 5 * DEVICE_WIDTH_RATIO,
marginTop: 5 * DEVICE_WIDTH_RATIO,
marginRight: 5 * DEVICE_WIDTH_RATIO,
marginBottom: 10 * DEVICE_WIDTH_RATIO
marginLeft: cellPadding,
marginTop: cellPadding,
}
});
... ...
... ... @@ -69,7 +69,7 @@ export default class HotCategoryList extends Component {
<TouchableOpacity yh_exposureData={yh_exposureData} onPress={() => {
this.props.onPressCategoryBMore && this.props.onPressCategoryBMore()
}}>
<View style={[styles.rowContainer, topMargin]}>
<View style={[styles.rowContainer, topMargin, {justifyContent: 'center'}]}>
<Text style={styles.moreText}>MORE</Text>
</View>
</TouchableOpacity>
... ... @@ -161,21 +161,20 @@ let styles = StyleSheet.create({
height: cellHeight,
marginTop: cellPadding,
marginLeft: cellPadding,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#f5f7f6'
},
rowThumbnail: {
width: 48 * DEVICE_WIDTH_RATIO,
height: 65 * DEVICE_WIDTH_RATIO
width: 63 * DEVICE_WIDTH_RATIO,
height: 85 * DEVICE_WIDTH_RATIO,
},
rowDefaultImageContainer: {
width: 48 * DEVICE_WIDTH_RATIO,
height: 65 * DEVICE_WIDTH_RATIO,
width: 63 * DEVICE_WIDTH_RATIO,
height: 85 * DEVICE_WIDTH_RATIO,
justifyContent: 'center',
alignItems: 'center'
alignItems: 'center',
},
rowDefaultImage: {
... ... @@ -184,9 +183,9 @@ let styles = StyleSheet.create({
},
rowTextContainer: {
width: 53 * DEVICE_WIDTH_RATIO,
width: cellWidth,
height: 28 * DEVICE_WIDTH_RATIO,
marginTop: 2 * DEVICE_WIDTH_RATIO
marginTop: -5 * DEVICE_WIDTH_RATIO
},
rowText: {
... ...
... ... @@ -144,19 +144,18 @@ let styles = StyleSheet.create({
height: cellHeight,
marginTop: cellPadding,
marginLeft: cellPadding,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#f5f7f6'
},
rowThumbnail: {
width: 48 * DEVICE_WIDTH_RATIO,
height: 65 * DEVICE_WIDTH_RATIO
width: 63 * DEVICE_WIDTH_RATIO,
height: 85 * DEVICE_WIDTH_RATIO
},
rowDefaultImageContainer: {
width: 48 * DEVICE_WIDTH_RATIO,
height: 65 * DEVICE_WIDTH_RATIO,
width: 63 * DEVICE_WIDTH_RATIO,
height: 85 * DEVICE_WIDTH_RATIO,
justifyContent: 'center',
alignItems: 'center'
},
... ... @@ -167,9 +166,9 @@ let styles = StyleSheet.create({
},
rowTextContainer: {
width: 53 * DEVICE_WIDTH_RATIO,
width: cellWidth,
height: 28 * DEVICE_WIDTH_RATIO,
marginTop: 2 * DEVICE_WIDTH_RATIO
marginTop: -5 * DEVICE_WIDTH_RATIO
},
rowText: {
... ...
... ... @@ -91,7 +91,7 @@ export default class List extends Component {
let bigPic = getSlicedUrl(src, 640, 640, 2);
let tagImg = tagMap[category_name];
if (!tagImg) {
tagImg = "../../image/chaopin_icon.png";
tagImg = require('../../image/chaopin_icon.png');
}
let likeImg = isFavor == 'N'?require('../../image/wsc_icon.png'):require('../../image/sc_icon.png');
let isLike = isFavor == 'N';
... ... @@ -102,7 +102,7 @@ export default class List extends Component {
<View style={styles.container}>
<View style={styles.sapatorView}/>
{this._renderHeader()}
<Image style={styles.image,{width: this.state.width, height: this.state.height}} source={{uri:bigPic}}>
<Image style={[styles.image,{width: this.state.width, height: this.state.height}]} source={{uri:bigPic}}>
<Image style={styles.tagContainer} source={tagImg}>
<Text style={styles.tagText}>{category_name}</Text>
</Image>
... ...