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 Demofolder 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.javafile in the code editor (if it is not opened for ...