图像未出现在反应本机应用程序中的ListView中

时间:2016-09-03 03:58:18

标签: ios react-native react-native-listview

我有一个呈现图像的ListView。

<ListView
  renderRow={this.renderRow}
  dataSource={this.dataSource}
  pageSize={4}
  initialListSize={4}
  contentInset={{ bottom: 50 }}
  automaticallyAdjustContentInsets={false}
/>

renderRow方法呈现图像如下:

<View style={styles.itemSection}>
  <Image
    source={{ uri: card.image }}
    style={styles.itemImage}
    resizeMode="cover"
  />
</View>

图像未渲染。截图如下: enter image description here

在将图像嵌入ListView中之后,图像被正确渲染。任何可以在ListView中查看图像的指针?

图片网址示例为:http://s3.amazonaws.com/sendto.us/postcards/fronts/000/000/017/original/from_api.png?1471627160

分享风格:

itemSection: {
    paddingTop: 20,
    paddingLeft: 30,
    paddingRight: 30,
    paddingBottom: 20,
    borderBottomColor: '#ccc',
    borderBottomWidth: StyleSheet.hairlineWidth,
    flexDirection: 'row',
  },
  itemImage: {
    width: 120,
    height: 80,
    borderWidth: 2,
    borderColor: '#333',
  },

1 个答案:

答案 0 :(得分:1)