2016-09-03 9 views
1

イメージをレンダリングするListViewがあります。イメージが反応するネイティブアプリケーションのListView内に表示されない

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

画像がレンダリング取得されていない次のよう

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

でrenderRow方法は、画像をレンダリングします。以下のスクリーンショット: enter image description here

イメージをリストビューに埋め込むと、画像が適切にレンダリングされていました。リストビュー内で画像を表示するためのポインタはありますか?

画像のURLの例は次のとおりです。http://s3.amazonaws.com/sendto.us/postcards/fronts/000/000/017/original/from_api.png?1471627160

スタイルを共有:また、あなたのinfo.plist enter image description here

にこれを追加すること

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', 
    }, 
+0

イメージはSVGではありませんか? – dv3

+0

これはpngまたはjpg画像です。 – vijayst

+0

は、styles.itemImageとstyles.itemSectionを共有します。 –

答えて

関連する問題