The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
Containers — sometimes referred to as layout managers — organize widgets on the screen. Containers position and size widgets based upon rules that you supply along with key device characteristics, such as available screen size.
Three containers have dominated Android app development since Android’s
introduction in late 2007:
This chapter focuses on those. Later chapters will explore other container
classes, such as 2016’s
sample project has a bunch of layout resources that this chapter will
use to illustrate how these containers work.
If you were to run this sample app, you would see a series of tabs, with one layout displayed per tab:
Figure 105: Sampler App, As Initially Launched
We are not going to get into the Java code associated with this
sample app in this chapter. That code relies on other topics, like
ViewPager widget, that we
have not gotten to yet. We will come back to this sample app and
see how the tabs were implemented then. For now, the focus is on the
layout files showing specific techniques for using these classic containers.
The preview of this section is en route to Mars.
The preview of this section was abducted by space aliens.
The preview of this section was lost due to a rupture in the space-time continuum.
The preview of this section was traded for a bag of magic beans.
The preview of this section took that left turn at Albuquerque.
The preview of this section apparently resembled a Pokémon.