Project Explorer and project anatomy
When we create a new Android project, we most often do so using a project template, just as we did in Chapter 1, Beginning Android and Java. The template we use determines the exact selection and contents of files that Android Studio will generate. While there are big similarities across all projects that are worth noting, seeing the differences can also help. Let's build two template projects and examine the files, their contents, and how they are all linked together through the code (XML and Java).
The Empty Activity project
The simplest project type with an auto-generated UI is the Empty Activity project. The UI is empty, but it is there ready to be added to. It is possible to generate a project without a UI at all as well. When we create a project, even with an empty UI, Android Studio also auto-generates the Java code to display the UI. Therefore, when we add to it, it is ready to be displayed.
Let's create an Empty Activity project. This...