I am trying to create this layout in Flexbox (and React Native), but I cannot get it to work. In particular, the Left and Right buttons do not expand to 50% of the width of the container, regardless of what I do. They are always the size of their contents.
I use nested containers. The buttons are located in the Flex column container, which is nested in the Flex Flex container, which also contains the image.

Here is my JSX:
<View style={{
display: 'flex',
flex: 1,
flexDirection: 'column'}}>
<Image
style={{flex: 1, zIndex: 1, width: '100%', height: '100%'}}
resizeMode='cover'
resizeMethod='resize'
source={require('./thumbs/barry.jpg')}
/>
<View style={{
display: 'flex',
flexDirection: 'row',
flex: 0,
width: '100%',
height: 100}} >
<Button style='flex: 1' title="LEFT" onPress={() => {}} />
<Button style='flex: 1' title="RIGHT" onPress={() => {}} />
</View>
</View>
source
share