Most visited

Recently visited

Designing for Multiple Screens

Dependencies and prerequisites

You should also read

Try it out

Download the sample app

NewsReader.zip

Android powers hundreds of device types with several different screen sizes, ranging from small phones to large TV sets. Therefore, it’s important that you design your application to be compatible with all screen sizes so it’s available to as many users as possible.

But being compatible with different device types is not enough. Each screen size offers different possibilities and challenges for user interaction, so in order to truly satisfy and impress your users, your application must go beyond merely supporting multiple screens: it must optimize the user experience for each screen configuration.

This class shows you how to implement a user interface that's optimized for several screen configurations.

The code in each lesson comes from a sample application that demonstrates best practices in optimizing for multiple screens. You can download the sample (to the right) and use it as a source of reusable code for your own application.

Note: This class and the associated sample use the support library in order to use the Fragment APIs on versions lower than Android 3.0. You must download and add the library to your application in order to use all APIs in this class.

Lessons

Supporting Different Screen Sizes
This lesson walks you through how to design layouts that adapts several different screen sizes (using flexible dimensions for views, RelativeLayout, screen size and orientation qualifiers, alias filters, and nine-patch bitmaps).
Supporting Different Screen Densities
This lesson shows you how to support screens that have different pixel densities (using density-independent pixels and providing bitmaps appropriate for each density).
Implementing Adaptative UI Flows
This lesson shows you how to implement your UI flow in a way that adapts to several screen size/density combinations (run-time detection of active layout, reacting according to current layout, handling screen configuration changes).

Hooray!