PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV Mobile 2024 → Android Back Button
Android Back Button
Iniciado por Dave Summers, 07,mar. 2018 23:27 - 3 respuestas
Publicado el 07,marzo 2018 - 23:27
Hi

Does anyone know how the syntax to either disable or trap the press of the android back button ?

or

is it my design, i have a multi-pane screen, i can navigate back a pane with the action bar button but the android back button takes me back to the previous window

Has anyone else had these design issues and what is the best solution ?

thanks
Dave
Publicado el 08,marzo 2018 - 10:43
Hi Dave,

just put a button (it can be hidden on the left or visible) on your
window where you want to trap the back key, and set it's shortcut to be
the back key... in the button, code the action you want executed when
the user presses back. That's all.

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 3/7/2018 à 5:27 PM, Dave Summers a écrit :
Hi
Does anyone know how the syntax to either disable or trap the press of
the android back button ?

or

is it my design, i have a multi-pane screen, i can navigate back a pane
with the action bar button but the android back button takes me back to
the previous window

Has anyone else had these design issues and what is the best solution ?

thanks
Dave
Miembro registrado
637 mensajes
Publicado el 08,marzo 2018 - 11:21
Hi dave,

You just need to create a back button with "abandon" status. Sorry I don't know how to say in English but have a look at the picture.

Then the code below should solve your issue. Just adapt the windows name and manage regarding the number of panels you have.

The button has to be out of the screen but visible status and active.

Regards,
Eric.

SI FEN_TraitementIntervention..Plan = 2 ALORS
FEN_TraitementIntervention..Plan = 1
RETOUR
FIN
SI FEN_TraitementIntervention..Plan = 3 ALORS
FEN_TraitementIntervention..Plan = 1
RETOUR
FIN




Mensaje modificado, 08,marzo 2018 - 11:24
Publicado el 13,noviembre 2023 - 17:41
Muy importante: si la pantalla contienes planos, el botón ha de estar situado en el plano 0, en caso contrario no funcionará.


Very important: if the screen contains planes, the button must be located on plane 0, otherwise it will not work.