Skip to content

Question: How to set shouldRecognizeSimultaneouslyWith in react native #25540

@mokai

Description

@mokai

Environment

"react": "16.8.3"
"react-native": "0.59.5"

Question

2019-07-08 13_27_47

I want to achieve a similar effect to the above. In iOS native, you only need to implement the outermost UIScrollView's shouldRecognizeSimultaneouslyWith to true to support multi-gesture response in the same direction, you can achieve the effect of sliding the outermost layer with the innermost FlatList. You only need to control the contentOffset of the two components.
So how to implement two ScrollView event penetrations in React Native to support the simultaneous sliding of two components

Code

<ScrollView 
	nestedScrollEnabled 
	stickyHeaderIndices={[1]}>
	<Header /> 
	<ScrollableTabBar />
	<ScrollView 
		horizontal 
		pagingEnabled 
		nestedScrollEnabled >
		<FlatList nestedScrollEnabled />
		<FlatList nestedScrollEnabled />
		<FlatList nestedScrollEnabled />
		<FlatList nestedScrollEnabled />
	</ScrollView>
</ScrollView>


Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.Type: QuestionIssues that are actually questions and not bug reports.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions