Summary
We discussed that so far, it has not been not important to completely understand exactly how the code works. This is because it will act just as a container for the code we write in the rest of the book. However, as we cover in detail topics such as methods in Chapter 4, Discovering Loops and Methods, and classes in Chapter 6, OOP – Using Other People's Hard Work, we will begin to make sense of all of the code in our games.
We discussed the somewhat complex Android life cycle in detail. We learned that all we need to understand at this stage is that we must write our code within the correct methods that relate to different phases of the life cycle. Then we will have no trouble making good progress with learning Java. As with classes and methods, all will be explained along the way and become clearer with practice.
We also learned the key areas of the Android Studio UI. We built our start menu for our math game using the Android Studio designer. Furthermore, we created the Java code necessary to make the game appear on the player's device. This was achieved mainly by modifying the code that was automatically generated for us.
This was probably the most difficult chapter of the book because it was necessary to introduce a few things such as Java classes, Java methods, and the Android life cycle. We did this because we need to know what is going on around us as we learn Java.
From now on, however, we can take things a step at a time in a very logical manner. If you have reached this point, you will have no problem completing the toughest of the projects in this book.
If this chapter made your brain ache a little, rest assured that the fact that you have made it this far is a very good indication that you are going to be a Java ace someday soon. Starting from the basics, let's learn some Java now.