The previous chapter focused on the various views available for you to use. In this chapter you will learn how to bring those views together into one layout and how to use the
Fragment class to inflate and interact with those layouts. You will also learn about the variety of view groups available for you to combine views as needed.
As mentioned in Chapter 2, “Understanding Views—The UI Building Blocks,” the
ViewGroup class is for views that can contain one or more child views.
ViewGroup provides the standardized methods for these classes to use so that they can perform tasks such as adding, removing, getting, and counting child views. The primary method you will use to ...