...
|
...
|
@@ -11,6 +11,7 @@ import ReactNative, { |
|
|
StyleSheet,
|
|
|
Dimensions,
|
|
|
TouchableOpacity,
|
|
|
Platform,
|
|
|
} from 'react-native';
|
|
|
import Immutable from 'immutable';
|
|
|
|
...
|
...
|
@@ -45,7 +46,7 @@ export default class HotBrandList extends Component{ |
|
|
return null;
|
|
|
}
|
|
|
|
|
|
let imageUrl = SlicedImage.getSlicedUrl(rowData.get("brand_ico"), 70, 29, 2);
|
|
|
let imageUrl = SlicedImage.getSlicedUrl(rowData.get("brand_ico"), (70 - diff), 29, 2);
|
|
|
let brandName = rowData.get("brand_name");
|
|
|
|
|
|
return (
|
...
|
...
|
@@ -81,6 +82,10 @@ export default class HotBrandList extends Component{ |
|
|
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
const DEVICE_WIDTH_RATIO = width / 320;
|
|
|
console.log("chenlin:" + "width:" + width + "height:" + height + "DEVICE_WIDTH_RATIO:" + DEVICE_WIDTH_RATIO);
|
|
|
let diff = (Platform.OS === 'android' && width < 440) ? 1 : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let styles = StyleSheet.create({
|
...
|
...
|
@@ -128,24 +133,24 @@ let styles = StyleSheet.create({ |
|
|
},
|
|
|
|
|
|
rowContainer:{
|
|
|
width: 70 * DEVICE_WIDTH_RATIO,
|
|
|
height: 70 * DEVICE_WIDTH_RATIO,
|
|
|
width: (70 - diff) * DEVICE_WIDTH_RATIO,
|
|
|
height: (70 - diff) * DEVICE_WIDTH_RATIO ,
|
|
|
},
|
|
|
|
|
|
rowImageContainer:{
|
|
|
width: 70 * DEVICE_WIDTH_RATIO,
|
|
|
width: (70 - diff) * DEVICE_WIDTH_RATIO,
|
|
|
height: 50 * DEVICE_WIDTH_RATIO,
|
|
|
justifyContent: 'center',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
|
|
|
rowThumbnail:{
|
|
|
width: 70 * DEVICE_WIDTH_RATIO,
|
|
|
width: (70 - diff) * DEVICE_WIDTH_RATIO,
|
|
|
height: 29 * DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
|
|
|
rowText:{
|
|
|
width: 70 * DEVICE_WIDTH_RATIO,
|
|
|
width: (70 - diff) * DEVICE_WIDTH_RATIO,
|
|
|
height: 20 * DEVICE_WIDTH_RATIO,
|
|
|
fontSize: 10,
|
|
|
color: '#B0B0B0',
|
...
|
...
|
|