ScrollView不适用于SimpleAccordian视图/

姆施赫尔

我正在尝试使用component:from library:'react-native-simple-accordian'创建Accordian。但是,当手风琴标题的数量更多时,我看不到ScrollView正常工作。

我的代码:

<View style={{flex:1}}>
        <ScrollView style={{flex:1}}>
            <View style={styles.container}>
                
                        <SimpleAccordion
                            style= {{
                              borderWidth:1,
                              borderRadius:15,
                              margin:3,
                              padding:5,
                              backgroundColor:'#ffffff'
                            }}
                            sections={sectionData}
                            renderHeader= {this.renderHeader}
                            renderContent={this.renderContent}
                            duration={1000}
                            touchableComponent={TouchableOpacity}
                            onChange={this.onChangeAccordian.bind(this)}
                            activeSection={this.state.open}
                        />
            </View>
        </ScrollView>
        </View>

样式对象是这样的:

container: {
      flex: 1,
      justifyContent: 'center',
    },

我在这里为ScrollView做错了什么样式或位置?反应性的

帕万坦克

如果是本机ScrollView,则可能需要在“ contentContainerStyle”道具中指定样式,还可能需要将flexGrow的样式属性设置为1

contentContainerStyle = {{
      flexGrow:1
}}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章