54 CHAPTER 2: Configuring Your Android App Development System
How Android Simplifies Design: Designing Apps Using XML
In Chapter 4, we will take a look at how Android uses the XML markup language to define the basic
component design for your application, especially its visual (graphics) design and its UI component
design. I look at XML as giving developers a maximum return on investment, as XML makes it
possible for absolute beginners to develop robust and functional applications right out of the gate!
That’s what the book is all about, after all; getting up-to-speed on Android as rapidly as possible!
Writing XML “markup” is not technically programming, but rather consists of using tags, similar to
the HTML5 tags that web developers use to format their online documents. These tags can also
contain configuration parameters to fine-tune them for your exact application design usage.
XML is used in Android to define everything from UI designs, to constants, to styles or themes to
data access, and even programming constructs like Java Object definitions, which we explore in
Chapter 5.
XML markup tags are far easier for beginners to comprehend than complex programming languages
such as Java. This is why I’m covering it first, right out of the gate, after the chapter after where we
discuss how Android is structured and stratified. Because it’s easier, we’ll use XML throughout this
book whenever possible, as Google recommends that developers do this.
Android Application Framework: Java Programming Primer
By the time you reach Chapter 5, you’ll have built a rock-solid integrated Android application
software development environment, and have acquired a basic understanding of all of the
components that make up an application development project (XML markup, Java code, text, UI
layout, UI widgets, images, audio, video, animation, and so on), and you will have learned how to
upgrade a new (an empty, or a “bootstrap”) Android application.
I will outline how Java programming logic or code and XML, along with any new media resources,
are compiled, compressed, and bundled into Android’s signature APK file type, and how the various
Android application components “talk” to each other inside your apps. The majority of Chapter 5,
however, will be dedicated to giving you a Java Programming “primer” in case you are unfamiliar
with Java SE.
We will look at the various concepts in Java, ranging from the entire API to your own custom
software “package” and the classes, methods, interfaces, variables, and constants that it may
contain, which will be based on what your application programming logic is trying to accomplish.
We’ll look at the concepts of Object Oriented Programming (OOP) so that you can understand how
to visualize what we will be doing in the rest of the book. We will also put all this Java programming
knowledge to good use and write our first Android class, called Galaxy.java, in Chapter 5.
Screen Real Estate: View and Activity Classes
Chapter 6 provides an overview of Android’s Activity class and View class. These contain and
define your “user experience,” or UX, on the screen. I’ll explain and demonstrate how an Activity
works. We will take a look at the new Android application you created in Chapter 3, and turn your
Java code from Chapter 5 into functional Android code. We will enhance the Java code inside of