When I wrap content like this example below, it scrolls Perfectly..
return( <ScrollView> <Text> TEST </Text> <Text> TEST </Text> <Text> TEST </Text> <Text> TEST </Text> ... </ScrollView> );
However, whenever I wrap it in another View, It will not scroll.
return( <View> <ScrollView> <Text> TEST </Text> <Text> TEST </Text> <Text> TEST </Text> <Text> TEST </Text> ... </SCrollView> </View> );
Is there some sort of fix to this. I am trying to put a nav bar header above all of the content, couldn't really figure it out though.
To fix ScrollView Not scrolling with React Native, we wrap the content of the ScrollView with the ScrollView. to wrap ScrollView around the Text components that we render inside. As a result, we should see text inside and we can scroll up and down.
Just put your text inside it and set height to scroll view.
How to set ScrollView horizontal in React Native. To set the ScrollView as Horizontal in React Native, use the ScrollView's prop as Horizontal = { true } . This makes this scroll view in a Horizontal format. If you want to make this scroll view in the vertical format, don't add this prop, and you are good to go.
It's a typo:
Your closing ScrollView
tag is: </SCrollView>
rather than </ScrollView>
. You also need to add a style to the View
container, here's an example of what it should look like:
return( <View style={{flex: 1}}> <ScrollView> <Text> TEST </Text> <Text> TEST </Text> <Text> TEST </Text> <Text> TEST </Text> ... </ScrollView> </View> );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With