Merge: app.nit: navigate between windows with the back button
authorJean Privat <jean@pryen.org>
Tue, 17 May 2016 20:17:43 +0000 (16:17 -0400)
committerJean Privat <jean@pryen.org>
Tue, 17 May 2016 20:17:43 +0000 (16:17 -0400)
commite68bcfc3de41ad4f458fd033293d979ae557a76e
tree7eefc14337058b282c7635ce143651df0718ba3c
parent01f09601f7c3782c34a39da030a695c7a6915194
parent247bd38a2e9f21b651c89b65a59dccaee7bc4566
Merge: app.nit: navigate between windows with the back button

This should be the last big feature of _app.nit_ needed for my thesis!

Intro services to navigate between multiple windows of the same app.
Windows are added to a stack and popped back to the visible state on pressing the back key.
This behavior was implemented for Android by intercepting events raised by the "hardware" back key.
iOS offers the same features natively so there is no adaptation needed as of now.
On GNU/Linux with GTK+, a button is added to the window header when there's a window to go back to.

These feature will probably have to be tweaked in the future, but they are enough for the Benilux client app. Notably, the life-cylce of each individual window has to be reconsidered and we will probably need some adaptation on iOS to have a better integration.

This PR also fixes a few bugs. The `EditText` losing focus in a `ListLayout` is fixed by a change to the Android manifest file, and vertical layout should now look better on iOS.

I took the opportunity to add other key events while working on the Android back key support.
These will be useful when migrating games from the old low-level implementation on the NDK to our custom `NitActivity.java`.

Pull-Request: #2100
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>
lib/android/ui/ui.nit
lib/app/ui.nit
lib/ios/ui/ui.nit
lib/linux/ui.nit