React-native – How to stretch ScrollView to the entire screen in this machine?

I have this code

render() {
return (



{array_with_two_items.map(this.createRow)}


)
}

With style

scrollView: {
flex: 1,
marginBottom:0,
},
containter: {
flex:1,
},

And the problem is that it looks Like this

+-----------+
| MENU |
+--------- --+
| item1 |
+-----------+
| item2 |
+----------- +
| |
| blank |
| not |
| scrollable|
+-----------+

< p>But I want it to look like

+-----------+
| MENU |
+-- ---------+
| item1 |
+-----------+
| item2 |
+---- -------+
| blank,but |
| still |
| part of |
| scrollview|
+------ -----+

I have almost no styling and flexbox Experience, so this is why I am asking. (The menu should not be part of the scrollview)

Just provide the prop contentContainerStyle to ScrollView, such as:

 contentContainerStyle={{
flex: 1
} }
>
/* Other Stuff */

I have this code

render() {
return (



{array_with_two_items.map(this.createRow)}


)
}

and style

scrollView: {
flex:1,
marginBottom:0,
},
containter: {
flex:1,
},

And the problem is that it looks like this

+----- ------+
| MENU |
+-----------+
| item1 |
+------- ----+
| item2 |
+-----------+
| |
| blank |
| not |< br />| scrollable|
+-----------+

But I want it to look like

+-----------+
| MENU |
+--- --------+
| item1 |
+-----------+
| item2 |
+----- ------+
| blank,but |
| still |
| part of |
| scrollview|
+------- ----+

I have almost no experience with styling and flexbox, so this is why I am asking. (The menu should not be part of the scrollview)

Just provide the prop contentContainerStyle to ScrollView, such as:

 contentContainerStyle={{
flex : 1
})
>
/* Other Stuff */

Leave a Comment

Your email address will not be published.