画像をレンダリングする 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>
画像を ListView に埋め込むと、画像は適切にレンダリングされました。ListView内で表示可能な画像を取得するためのポインタはありますか?
画像 URL の例: 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',
},