Lifecycle demo app
In this section, we will do a quick experiment that will help familiarize ourselves with the lifecycle methods our app uses, as well as give us a chance to play around with a bit more Java code.
Follow these steps to start a new project, and then we can add some code:
Start a new project and call it Lifecycle Demo. Of course, the code is in the download bundle in the
Chapter 6/Lifecycle Demo
folder should you wish to refer to it or copy and paste it.Accept the default target devices.
Choose Basic Activity and don't worry about customizing the activity options on the Configure Activity screen.
Wait for Android Studio to generate the project files, and then open the
MainActivity.java
file in the code editor (if it is not opened for you by default) by left-clicking on the Main Activity tab above the editor.
Note
If the preceding steps were not detailed enough, check back to any of the other occasions in which we created a new project for further details.
You have created a new...