I am trying to set the horizontal ScrollView
inside the component TouchableOpacity
(for necessary reasons). However, it TouchableOpacity
redefines any horizontal scrolling capabilities and performs onPress
even for horizontal touch movement.
Is there a way to prioritize touch ScrollView
over parent Touchable
? Thus, the user can scroll the component and click on it. Below is a code snippet similar to what I am trying to implement.
<TouchableOpacity
onPress={this._onPress}>
<View>
... Some view I want static ...
</View>
<ScrollView
horizontal={true}>
... A bunch of components I want scrollable ...
</ScrollView>
</TouchableOpacity>
Thanks!
source
share