...
|
...
|
@@ -70,18 +70,23 @@ export default class Recommend extends React.Component { |
|
|
let backgroundWidth = Dimensions.get('window').width;
|
|
|
let backgroundHeight = 64 + 20 + Math.ceil(list.size/4) * Dimensions.get('window').width/4;
|
|
|
|
|
|
return (
|
|
|
<View style={{width: backgroundWidth,height:backgroundHeight,backgroundColor:'#f0f0f0'}}>
|
|
|
<ListView
|
|
|
automaticallyAdjustContentInsets={false}
|
|
|
contentContainerStyle={styles.grid}
|
|
|
dataSource={this.dataSource.cloneWithRows(list)}
|
|
|
renderRow={this.renderRow.bind(this)}
|
|
|
renderHeader = {this.renderHeader.bind(this)}
|
|
|
pageSize={Math.ceil(data.length/4)}
|
|
|
/>
|
|
|
</View>
|
|
|
);
|
|
|
if (list != null) {
|
|
|
return (
|
|
|
<View style={{width: backgroundWidth,height:backgroundHeight,backgroundColor:'#f0f0f0'}}>
|
|
|
<ListView
|
|
|
automaticallyAdjustContentInsets={false}
|
|
|
contentContainerStyle={styles.grid}
|
|
|
dataSource={this.dataSource.cloneWithRows(list)}
|
|
|
renderRow={this.renderRow.bind(this)}
|
|
|
renderHeader = {this.renderHeader.bind(this)}
|
|
|
pageSize={Math.ceil(data.length/4)}
|
|
|
/>
|
|
|
</View>
|
|
|
);
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|