A (175)

(Tuis.) #1
CHAPTER 2: Configuring Your Android App Development System 55

your application’s Primary (Main) Activity class. You’ll have learned about classes in the previous
Chapter 5, so as I mentioned, we will always build on your previous knowledge base as we
progress through this book.


We will also take a look at the Android View, which is the foundation for everything that displays
on the Android display screen and inside of these Activities that you will create as an Android
applications developer. Like the Activity, the View is another very high-level Android component, and
we will take a close look at how the View is used to create UI elements and layouts (designs) that
ultimately make your application easy to use, functional, and even fun!


You will learn how Android’s Views are used to create the UI “widgets” in Android, which are the UI
design elements that you will utilize to create your functional user interface design for your Android
app inside of Android’s UI layout containers, which are based on the ViewGroup class.


You will learn about the different screen resolution, density, orientation, and aspect ratio (width)
issues in Android, which you will need to understand so that you can make your applications span
across various Android hardware devices such as smartwatches, tablets, and iTV sets.


Chapter 6 explains how your UI is contained within the Android device display screen. Android
device display screens are the way most users interact with their Android applications. In Android,
your UI is written to the display using a mixture of Java (Activity class) and XML markup. This
defines View and ViewGroup widgets and layouts, which controls the custom hierarchy of View and
ViewGroup objects, which you’ve designed using nested ViewGroup layout containers (or using a
single layout container).


These ViewGroup layout containers ultimately hold all the other graphics (Chapter 9) and UI content
for your application in its proper place, and thus ViewGroup classes provide a foundation for Android
application design. You’ll want to learn these display screen (Chapter 6) and UI layout design (Chapter 8)
concepts thoroughly, as they are core concepts to implementing everything else that Android can do.
After all, without a proper UI, your user cannot access software functionality in the first place!


You’ll revisit XML markup again in this chapter, as you will in almost every chapter in this book, and
learn how XML allows you to define complex screen layouts and UI designs without writing a single
line of Java code. You will learn about the different types of layout containers, and how each can be
useful in different UI design scenarios, and you will continue to code a really cool Activity for your
application, which is written almost completely using XML markup.


Interactivity: Using Android Intent and Event Handling


In Chapter 7, we’ll start building interactive applications using Android’s Intent class to make
our application menu system functional. We will also make the UI screens for your application
interactive, as you’ll learn how to implement Android Event Handler and Event Listener capabilities.


We’ll take a look at how to use Android’s Intent class, and Event Handling capabilities, to launch
new Activity subclasses and to make your UI design functional. Although this is fairly advanced
material, we need to cover it fairly early on in the book, so that we can make sure all of the remaining
chapters, which cover how to integrate new media and data external to your application with your UI
design, can be made to function (be interactive).

Free download pdf