-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Mobile] Add back button handling #2910
Comments
I don't think we can block it - exiting the app must be allowed, to go to previous app etc. However:
Yes It could be good to implement the default so with multiple windows it hides the top one and goes back a level. Further items would be interesting to explore, but as we don't have a navigation system in place yet it is hard to determine how that should work. |
I m not expert, but I found two link: |
I think exposing the ability for the Fyne app to capture the back button keyevent would be good enough for now - leave the default behavior to exit the Fyne app but if an app does handle its own navigation context, let it override the back button to go back a page. (side note it'd be nice to have an API to bind iOS's swipe-from-left, swipe-from-right gestures as well) |
This is under way :) It's gonna be a little tough to figure the right API, but the technical challenges are overcome already! |
That's in develop ready for v2.4.0 |
Is your feature request related to a problem? Please describe:
On Android, to my knowledge the back button isn't "caught" as a keyboard event, and always quit (minimize) the app.
This prevent us for building "proper" apps where Back can be used to quit a submenu / go to the previous screen.
Is it possible to construct a solution with the existing API?
I'm not sure if just adding a KeyEvent (how ?) would be enough or if it is rooted deeper.
I don't think the other 2 buttons (recent-app & home) need handling because their use is identical whatever the app is running on screen and the OS probably lock them. There is also historically the "menu" button but it's not really used anymore I don't think it matters.
If someone have an idea I could take a shot at it.
Describe the solution you'd like to see:
I'm not sure if handling it as a key Event is the best option or goes well with the guidelines ?
But I think it is absolutely essential we can at least block the behavior of "back button > exit the app", even better handle it. I've made an app for someone, their biggest annoyance is pressing the back button to exit a window/form (as would be normal in any app) and have the whole app minimized.
The text was updated successfully, but these errors were encountered: