Exploring the project's Java code and the main layout's XML code

We are going to look at the resource files that have the code that defines our simple UI layout and the file that has our Java code. At this stage, we will not try to understand it all as we need to learn some more basics before it makes sense to do so. What we will see, however, is the basic content and structure of both files so we can reconcile their content with what we already know about Android resources and Java.

Examining the HelloWorldActivity.java file

Let's look at the Java code first. You can see this code by left-clicking on the HelloWorldActivity.java tab, as shown in the following screenshot:

As we are not looking at the intricate details of the code, an annotated screenshot ...

Get Android Programming for Beginners - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.