首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >两个滚动视图之间有很大的空间,因为wrap - React Native

两个滚动视图之间有很大的空间,因为wrap - React Native
EN

Stack Overflow用户
提问于 2017-04-08 02:40:14
回答 1查看 2.2K关注 0票数 0

我正在创建不同的滚动视图,视图不正确。在ScrollView End和ScrollView Start之间有一个很长的空间,我不知道应该修改什么样式来避免这种情况。当滚动视图设置为换行时,会出现长空格!

有什么想法吗?

我正在创建类似这样的东西:

代码语言:javascript
复制
 <View>
<ScrollView
    contentContainerStyle={{
        flexDirection: "column",
        alignContent: "space-around"
    }}
    automaticallyAdjustContentInsets={false}
    contentInSet={{ bottom: 49 }}
    style={{ paddingBottom: 0, marginBottom: 0 }}
>
    <Text>Testing</Text>
    <ScrollView
        contentContainerStyle={globalStyles.COMMON_STYLES.scrollView}
        automaticallyAdjustContentInsets={false}
        contentInSet={{ bottom: 49 }}
        style={{ padding: 0, margin: 0 }}
    >
        <Text>ScrollView End</Text>
    </ScrollView>
    //Here is the problem!!! Lot of space in the IOS Simulator.
    <Text>ScrollView Start</Text>
    <ScrollView>
        <Text>Test</Text>
    </ScrollView>
</ScrollView>
</View>;

 globalStyles.COMMON_STYLES.scrollview
   scrollView: {
    flexDirection: 'row',
    flexWrap: 'wrap',
 } 

在下面的滚动视图中有一个很长的空格:

EN

回答 1

Stack Overflow用户

发布于 2017-12-07 16:42:50

尝试在ScrollView上使用此命令

代码语言:javascript
复制
automaticallyAdjustContentInsets = {false}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43285057

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档