1
我有滾動視圖與pagingEnabled通過圖片,工作正常滾動,但它將會滾動顯示第二圖像的一半,看到gif動畫連接使用React Native使scrollView在x軸上移動特定大小?
https://media.giphy.com/media/xUA7b6pv9MNdp0R97O/giphy.gif
代碼:
<ScrollView
style={{flex:1}}
horizontal
ref={(scrollView) => { this.scrollView = scrollView }}
automaticallyAdjustContentInsets={false}
directionalLockEnabled
alwaysBounceVertical={false}
pagingEnabled
scrollsToTop={false}>
<Image style={styles.destination} source={require("../images/favdest1.jpg")} />
<Image style={styles.destination} source={require("../images/favdest1.jpg")} />
<Image style={styles.destination} source={require("../images/favdest1.jpg")} />
</ScrollView>
如何使scrollView捕捉到特定寬度或子視圖?