React Native - Scrollview垂直与scrollview水平吗?

时间:2017-06-17 12:39:10

标签: react-native react-native-android react-native-ios

我正在创建一个APP来显示纪念碑的兴趣点。现在我在ScrollView(垂直方式)上渲染信息。输出是这样的:

I edited the image, it continues, but I think you get the point.

这是我的代码:

return (
        <View style={styles.container}>
            <View style={styles.contentContainer}>
                <ScrollView>
                    {monumento.pois.map((poi, index) => (
                            <View key={index} style={{marginBottom: 15}} >
                                <Tile
                                    imageSrc = {{uri:poi.image}}
                                    contentContainerStyle = {{marginBottom: -30}}
                                />
                                <View style={styles.map}>
                                    <Icon
                                      raised
                                      reverse
                                      name='location-on'
                                      color='#075e54'
                                      size={36}
                                      onPress={() => navigate('Mapa', {monumento: monumento})} />
                                </View>
                                <View style={styles.titleContainer}>
                                    <Text style={styles.titleText}>{poi.name}</Text>
                                </View>
                                <View style={styles.bodyContent}>
                                    <Text style={styles.bodyText}>{poi.description}</Text>
                                </View>
                            </View>
                    ))}
                </ScrollView>
            </View>

        </View>
    );

我想要的是正常滚动一个兴趣点(PoI),但下一个PoI我希望他通过水平流氓出现(向左滑动)......就像这样:

sample

我怎样才能做到这一点?谢谢!

0 个答案:

没有答案
相关问题