NativeBase
NativeBase copied to clipboard
Flex direction on content not working
I want to display two images side by side instead of on in the bottom of another. Here is my code :
<Content style={{flexDirection: 'row', flexWrap: 'wrap'}}>
<Image
key={data[0]['id']}
source={{ uri: data[0]['image']['url']}}
style={{
width: Dimensions.get('window').width * 0.2,
height: 120,
}}
/>
<Image
key={data[1]['id']}
source={{ uri: data[1]['image']['url']}}
style={{
width: Dimensions.get('window').width * 0.2,
height: 120,
}}
/>
</Content>
But it is not working as it should. What am I missing here?
@tishad770 if you are trying for something like the above you can use the library from here
you can import Row & Col from 'native-base' itself.
Temporary Solved. Used View instead of Content. But the issue remains with Content.