Static Fragments and Dual-Pane Layouts
The previous exercise introduced you to static fragments, those that can be defined in the activity XML layout file. One of the advantages of the Android development environment is the ability to create different layouts and resources for different screen sizes. This is used for deciding which resources to display depending on whether the device is a phone or a tablet. The space for laying out UI elements can increase substantially with the larger size of a tablet. Android allows specifying different resources depending on many different form factors. The qualifier frequently used to define a tablet in the res
(resources) folder is sw600dp
. This states that if the shortest width (sw) of the device is over 600 dp, then use these resources. This qualifier is used for 7" tablets and larger. Tablets facilitate what is known as dual-pane layouts. A pane represents a self-contained part of the user interface. If the screen is large enough, then...