167
Chapter 6
Android Screen Design: Writing
to the Display Using Activity
and View
Now that you’ve been exposed to the Android operating system, and have seen how it works from
a high-level view, have learned about XML and Java, and how they are used in Android application
development, the next thing we need to take a closer look at is how Android “addresses” or writes
things to the device display screen.
In the new age of touchscreen devices, such as smartphones, tablets, eBook readers, iTVs, and
smartwatches, the display screen has become the center of not only the visual feedback for your
application but also for interacting with it. This chapter will cover those classes that allow your
Android app to write things to the device display screen, such as Activity classes, UI elements, and
of course, the app’s primary subject matter content.
There are some very important Android superclasses, such as Activity, View, and ViewGroup,
which provide a foundation for the subclasses that you will use to get your application content and
UI onto the display screen. The superclasses are not used directly in the application, but you need to
know about them nonetheless.
We will look at Activity subclasses, used for organizing your application’s functional screens, which
ultimately will provide the structure for your end user’s workflow, let’s call it the “use-flow,” for your
Android application.
We will look at View subclasses, used for creating your application’s UI element components; these
are also known as “widgets” in Android jargon, as you will soon see. We will look at the ViewGroup
subclasses, used for creating your application’s UI layout containers. Layout containers are used
to contain View subclassed UI widgets, which make up the body of the UI design, providing the UI
layout with its functionality.