Testing Alternative Resources

It is important to test your layouts and other resources. Testing layouts will tell you how many alternatives you need for different screen sizes, orientations, and more. You can test on devices both real and virtual. You can also use the graphical layout tool.

The graphical layout tool has many options for previewing how a layout will appear in different configurations. You can preview the layout on different screen sizes, device types, API levels, languages, and more.

To see these options, open fragment_hello_moon.xml in the graphical layout tool. Then try some of the settings indicated in the following figure.

Figure 15.4  Using graphical layout tool to preview resources

You can ensure that you have included ...

Get Android Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.