Issue
<ScrollView contentContainerStyle={{flexGrow: 1}}>
<View></View>
<View><LinearGradient></LinearGradient></View>
</ScrollView>
How do i make the second View or the LinearGradient to fill the remaining height. I don't have specific height set on the first View. I've tried flex: 1 for the second view but it still doesn't work.
Solution
Adding flex to your second view works:
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
<View></View>
<View style={{ flex: 1, backgroundColor: "red" }}>{Other content here}</View>
</ScrollView>
Answered By - yoann84
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.