I am trying to make item tiles and want to have even gap between two items like this..
As we can see, this is not happening in IOS
My Code:
<ScrollView
horizontal
scrollEnabled={false}
style={{ paddingHorizontal: constVal.containerPaddingHorizontal, overflow: 'hidden' }}>
<FlatList
data={data}
numColumns={2}
nestedScrollEnabled={true}
scrollEnabled={false}
columnWrapperStyle={{ width: '100%', justifyContent: 'space-between' }}
renderItem={({ item, separators, index }) => (
<Pressable
key={item.id}
onPress={() => {
navigation.navigate('ProductDetail', { id: item.id })
}}
>
<ProductCard
item={item}
/>
</Pressable>
)}
/>
</ScrollView>
I have set the width of the columnWrapper same as ScrollView and added space between the 2 columns.