Normally the "back" button will exit your application, but if you wanted to put that functionality into an "exit" button, then you'll need to call YourActivity.finish().
*update 21/02/2011*
Just keep in mind that this will mark an activity as "ready to be cleaned up" by the OS.
It will not immediately clean it up, so don't worry when you see the activity reside in the emulator for a bit longer.
Android: How to stop and exit your application
Posted by
twig
at
11:48 AM
Monday, November 29, 2010