I am trying to vertically align Content component from NativeBase with ability to scroll if content inside is too big for the screen size.
This means that in large devices content is vertically aligned to center while in small devices is scrollable as its height is higher then device height.
Can achieve both in separate ways, but never together.
Components:
<Container style={styles.container}>
<Content contentContainerStyle={styles.content}>
{bunchOfContent}
</Content>
</Container>
Styling for vertically aligned but not scrollable:
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
content: {
flex: 1,
justifyContent: 'center'
}
And for scrollable but not vertically aligned:
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
content: {
justifyContent: 'center'
}