Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Now that you have written some Android code you
know that Activity, View, and the layout and widget subclasses of
View are among the most important classes
in Android. Typically, an Android user interface is built from widget views
organized in layouts: a ListView in a
LinearLayout, for instance. A single
hierarchy of view objects gets loaded from a resource (or created by code)
when an Activity is started. It is
initialized and displayed on the device screen.
For small screens, this is fine: users move from
screen to screen to access different parts of a program’s UI, and the
Activity class (Android’s concept of a
task) supports a back stack that enables quick and intuitive traversal
through the strictly tree-structured interface. This changes completely,
however, when the UI is spread over the surface of a larger tablet screen.
Some parts of the screen remain constant over longer durations than others.
Some parts of the screen determine the contents of other parts. A card-stack
metaphor just doesn’t cut it.