-
Notifications
You must be signed in to change notification settings - Fork 51
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
Demo: Custom back handler for android hardware back button #272
Conversation
Concise and beautiful code , pleasant to read. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
@ashwinibm there are two new questions related to navigation:
|
https://reactnavigation.org/docs/1.x/stack-navigator#gesturesenabled |
thank you @ashwinibm , the links can deal with enable/disable gestures, can't handle |
hi @ashwinibm , after practical test , this method is a good way, but only can handle some simple action, like popToTop() or pop(count), can not do complicated action, like navigate() to specific page.
below are the details.
and here the test starts:
more test
above all, just some cases need to share. |
Thanks for all the details. Yes, you are right. it's limited to a few actions like disabling, popping to the root screen, etc. @adamstep any other ideas? |
yes, some issues gradually merge as the business complexity increases. now there are a few scenarios we've met until now.
now the priority of above issues is not urgent, so pls take your time. |
hi, @ashwinibm , support of the swipe left/right gesture(#279) and android physical back key is on the plan in our next sprint. |
Hi @terryatgithub
In our app, we should now be able to access the extra attribute as part of Note: The name for this attribute can be more precise. I've just described a general approach. cc: @adamstep |
hi @ashwinibm , I will try this method when solving this feature in the future. |
This would need to be coupled with android back key handling that is described in this PR. I haven't looked into the gestures much but gesture handling is also part of react navigation library. If hyperview passes through the custom attributes to the app, we should be able to use the library's gesture handlers based on those attributes. |
ok, we will try later. |
Summary
Demo
custom_back_screen.mp4