我有一個listView我在哪裏使用水平滾動視圖來顯示畫廊。前13列listView中有畫廊顯示完美,但其餘的圖像只是空白。只有佔位符在那裏。這可能是什麼原因。水平滾動視圖不顯示所有圖像反應本地
<View>
<ScrollView
style={styles.container}
automaticallyAdjustInsets={false}
horizontal={true}
decelerationRate={0}
snapToInterval={CARD_WIDTH + CARD_MARGIN*2}
snapToAlignment="start"
contentContainerStyle={styles.contentT}
pagingEnabled={true}
showsHorizontalScrollIndicator={false}
>
{_this.props.media.first_five_photos.map(function(photo) {
return (<View style={[{width:width, height: _this.props.media.height},styles.card]} key={photo.id}>
<Text>
<Image
source={{uri: photo.image_url}}
style={{width:width, height: _this.props.media.height}}/>
</Text>
</View>)
})}
</ScrollView>
<View style={{position: "absolute",right: 15, top: (this.props.media.height/2)-20}}>
<Text >
<Image style={{height: 30,width:30}} source={require("../assets/white-img-slide.png") }/>
</Text>
</View>
</View>
檢查URI,寬度和圖像的高度,如果他們都很好? –
一切都在這裏,當我做它的單一圖像的作品,或者當我重複單一的圖像它的作品,但與動態網址。它只是返回空白。 –
你可以在這裏測試應用程序https://rnplay.org/? – stereodenis