Intentional screen management
Until now, we've considered each activity to always correspond to a single screen in our application. We've used fragments only to represent subsections within each screen. As an example, let's think back to the way we've constructed our book-browsing application. In the case of a wide-display device, our application uses a single activity containing two fragments. One fragment displays the list of book titles, and the other fragment displays the description of the currently selected book. Because both of these fragments appear on the screen at the same time, we display and manage them from a single activity. In the case of a portrait-oriented handset, we chose to display the book list and the book description on separate screens. Because the two fragments do not appear on the screen at the same time, we manage them in separate activities.
An interesting thing is that the tasks our application performs are identical in both cases. The only difference is how much...