I am having a problem with the TouchableOpacity and react-native-maps.
I have a View with a MapView and a View, with an absolute positioned TouchableOpacity inside, like the code below:
<View style={{ flex: 1, flexDirection: 'column-reverse' }}>
<MapView style={{ flex: 1 }} />
<View style={{ height: 55 }}>
<TouchableOpacity style={{ position: 'absolute', top: 100 }}>
<Text>Button</Text>
</TouchableOpacity>
</View>
</View>
When I click over the TouchableOpacity in this case, it works as intended, but I need my inside View to have a white background color, like this:
<View style={{ flex: 1, flexDirection: 'column-reverse' }}>
<MapView style={{ flex: 1 }} />
<View style={{ height: 55, backgroundColor: '#ffffff' }}>
<TouchableOpacity style={{ position: 'absolute', top: 100 }}>
<Text>Button</Text>
</TouchableOpacity>
</View>
</View>
But as soon as I place the backgroundColor tag in the style, the TouchableOpacity stops working at all, and all clicks above the MapView are actually seen as clicks in the map itself.
Anyone has any clue of how to solve that? I really need to have a background in the View, so it is not possible to remove that.