I have played with the "Two Activities" example and have a query.
When you run the program (on emulator) the second activity starts and when one clicks an item in the list then you are returned to Main activity. All works as required .. however
When one wants to end the program you click on the return symbol and the first activity is stopped BUT second activity now pops up.
Is there an equivalent opposite command from "Startactivity" such as "Endactivity" to accomplish this...
i.e. I would like to clean up all activities when main activity is closed by user.
Instead of calling StartActivity(Main) in the second activity you can call Activity.Finish to close the second activity and return to the previous one.
You can also call ExitApplication to stop the current process and all the activities. Though this is less recommended.
Reason I asked is that I noticed sometimes in the first statement, the screen goes blank before the form2 screen appears. This is more obvious when I'm adding records to sql file and returning it to previous form.
In some cases, I have to use the 2nd approach. Which script should we use?