Android Question How to press back button from app

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
I have a MAIN module that calls the EDIT module to add or update records.

This secuence works ok:
I call the EDIT with StartActtivity(EDIT)
In the EDIt, if I press the back button to cancel, then I return to the MAIN and if I press back button again I exit the app.

This does not:
In the EDIT, I have buttons for add edit or delete, when I finish the code the I go back to the MAIN with StartActivity(MAIN)
NOw if I press back button in the MAIN i go back to the EDIT module.

I suppouse it can be fixed by pressing the back button intead of the startactivity.

How can I press the back button from my app? or are there any other way?

Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…