If you want to quit your List/Details views when the user closes your app, have them finish()
themselves in their onPause
which is called when your Activity
is closed.
The only caveat here is that calling finish()
will move it one Activity back in the ActivityStack so if your MainActivity isn't the one launching the List/Details views, it will not go back to the MainActivity. In this case, you could specify in the AndroidManifest.xml
<activity android:name="sample.activity.MyActivity" android:noHistory="true" />
to prevent the List/Details activities from ever being put into the history.