PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV Mobile 2024 → Android Back Button
Android Back Button
Started by Dave Summers, Mar., 07 2018 11:27 PM - 3 replies
Posted on March, 07 2018 - 11:27 PM
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
Posted on March, 08 2018 - 10:43 AM
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
Registered member
637 messages
Popularité : +36 (36 votes)
Posted on March, 08 2018 - 11:21 AM
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




Message modified, March, 08 2018 - 11:24 AM
Posted on November, 13 2023 - 5:41 PM
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.