Android avoiding Back button to send the application to backgroung

41 views
Skip to first unread message

Eyal Muchtar

unread,
Sep 19, 2013, 8:13:30 AM9/19/13
to codenameone...@googlegroups.com
Hi,
How can i avoiding sending the application to background when Back button pressed and going to the previous screen?
Thanks,
Eyal. 

Joshua Aroke

unread,
Sep 19, 2013, 8:40:29 AM9/19/13
to codenameone...@googlegroups.com
From the component property inspector in the GUI Builder, add a command to your form, while adding the command, check the back command option and also select the form you want this to goto as the action.

Eyal Muchtar

unread,
Sep 19, 2013, 8:54:32 AM9/19/13
to codenameone...@googlegroups.com
Hi Joshua,
I'm not using the GUI Builder currently. How can i do this in my code?
Thanks for your quick reply.
Eyal.

Joshua Aroke

unread,
Sep 19, 2013, 10:41:48 AM9/19/13
to codenameone...@googlegroups.com
add this to you Form:

form.setBackCommand(cmd);
 

Shai Almog

unread,
Sep 19, 2013, 12:19:44 PM9/19/13
to codenameone...@googlegroups.com
You can define the theme constant minimizeOnBackBool=false
Reply all
Reply to author
Forward
0 new messages