Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When Android made the jump from phones to tablets, Google had to redesign the architecture of applications because Android’s existing UI elements were insufficient to create the type of information-rich interfaces required by tablets. To address this issue, Google introduced the fragments framework in Android 3.0. Fragments provide a method for decomposing your UI into its constituent parts so that each may be presented in a manner that is right for the device it’s running on (Figure 5.1). On a phone, the list view would consume the whole screen, and tapping an item would take the user to a new screen presenting content. But on a tablet, the list view is simply a part of the display, with the content being displayed simultaneously. As you can see in Figure 5.1, the list view and the content are each contained in a fragment.