I am trying to create an Accordian using the component : from library:'react-native-simple-accordian'. But when the number of accordian headers are more I can't see the ScrollView working correctly.
My code:
<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>
The styles object is like this:
container: {
flex: 1,
justifyContent: 'center',
},
What styling or positioning am I doing wrong here for ScrollView? react-native