Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirement: detect swipe left, and back to specific page #279

Open
terryatgithub opened this issue May 19, 2021 · 3 comments
Open

Requirement: detect swipe left, and back to specific page #279

terryatgithub opened this issue May 19, 2021 · 3 comments

Comments

@terryatgithub
Copy link
Contributor

terryatgithub commented May 19, 2021

when user swipe left(go back previous [specific] page) or swipe right(go to next [specific] page) in both iOS/Android,
Can the gestures be detected and handled by the same customized method with hardwareBackPress #268 ?

like the way #272 implemented by @ashwinibm about the Android physical back key.
if yes, how to implement it ?

Thanks a lot.

@terryatgithub terryatgithub changed the title Requirement: Requirement: detect swipe left, and back to specific page we want. May 19, 2021
@terryatgithub terryatgithub changed the title Requirement: detect swipe left, and back to specific page we want. Requirement: detect swipe left, and back to specific page May 19, 2021
@roelve
Copy link

roelve commented Jun 1, 2021

Bump! (I'd like an answer to this question as well, swiping is an interaction that I think is quite usefull).

@adamstep
Copy link
Contributor

adamstep commented Jun 2, 2021

@roelve are you refering to a generic swipe gesture, or "swipe from edge" like @terryatgithub ? Swiping from the edge to navigate back is something that's handled within the React Navigation library, and we're looking into ways of handling it properly. A generic swipe gesture would be useful as well, and it would help if you have some use cases in mind as we think about an implementation and API for the feature.

@roelve
Copy link

roelve commented Jun 17, 2021

Excuse this late reply. What I mainly meant is something like the second example that is included here: https://reactnative.dev/docs/animations (the one called "ScrollView with Animated Event Example") but instead of scrolling between images, scrolling between different screens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants