The Android Notepad tutorial (exercise 3)
At the end of exercise 2 we found Notepadv2 crashes if the back button is pressed while the activity is in the foreground. Notepadv3 adds a full activity lifecycle to the NoteEdit class to solve this. This exercise is well documented in http://developer.android.com/resources/tutorials/notepad/notepad-ex3.html Rather than importing the Notepadv3 code supplied as a new project, I started a new project based on the final code I had for Notepadv2. Outside of Eclipse I copied the Notepadv2 folder to create a Notepadv3 folder in the Eclipse workspace. Then in Eclipse I selected File -> New -> Android Project. I then selected ‘create project from existing source’, and filled in the project and activity names. If you are following this, click on Finish. Right click on the new project in the package explorer window and select close unrelated projects. Now we need to create a notepadv3 activity from the notepadv2 activity. Double click on the Notepadv2.java class in the package explorer w...