5.3.8. Supporting Different Screen Sizes and Resolutions

In Section 2.5.1 you learned that Android devices have various screen sizes, resolutions and pixel densities (dots per inch or DPI). You also learned that you typically provide images and other visual resources in multiple resolutions so Android can choose the best resource for a device’s pixel density. Similarly, in Section 2.8, you learned how to provide string resources for different languages and regions. Android uses resource folders with qualified names to choose the appropriate images based on a device’s pixel density and the correct language strings based on a device’s locale and region settings. This mechanism also can be used to select resources from any of the resource folders ...

Get Android™ How to Program, Second Edition 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.