When I have a simple View
with another View
inside it that has a higher height, it looks like this:
<View horizontal={true} style={{height: 100, width: 100, backgroundColor: "red"}}>
<View style={{height: 150, width: 50, backgroundColor: "blue"}}></View>
</View>
In other words, I can see the 50px of the blue View
that overflow the red one.
When I change the parent View
into a horizontal ScrollView
however, the overflowing 50px of the blue one are clipped, like this:
<ScrollView horizontal={true} contentContainerStyle={{height: 100, width: 100, backgroundColor: "red"}}>
<View style={{height: 150, width: 50, backgroundColor: "blue"}}></View>
</ScrollView>
I want the ScrollView
to not clip the overflowing blue part of its child. How do I do this?
I already tried adding overflow: "visible"
to the styles, but that didn't work.