我试图在React Native中使用水平ScrollView,并设置pagingEnabled = {true}.它适用于iOS,但不适用于 Android ScrollView style={{marginTop: 10}} horizontal={true} pagingEnabled={true} ref={(scrollView) = { _scrollView = scrollVi
<ScrollView style={{marginTop: 10}} horizontal={true} pagingEnabled={true} ref={(scrollView) => { _scrollView = scrollView; }} onScroll={this._handleScroll} scrollEventThrottle={16}> <View style={styles.starView}> <Text>1</Text> </View> <View style={styles.videoView}> <Text>2</Text> </View> <View style={styles.techView}> <Text>3</Text> </View> </ScrollView>从0.28, in 0.27 it is not supported开始支持android的pagingEnabled属性.您应该检查您的react本机版本并升级.