• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Designing for Multiple Screens
2page.tags="tablet","tv","fragments","support"
3
4trainingnavtop=true
5startpage=true
6
7@jd:body
8
9<div id="tb-wrapper">
10<div id="tb">
11
12<h2>Dependencies and prerequisites</h2>
13
14<ul>
15  <li>Android 1.6 or higher (2.1+ for the sample app)</li>
16  <li>Basic knowledge of <a
17href="http://developer.android.com/guide/components/activities.html">Activities</a> and
18<a href="http://developer.android.com/guide/components/fragments.html">Fragments</a></li>
19  <li>Experience building an Android <a
20href="http://developer.android.com/guide/topics/ui/index.html"> User Interface</a></li>
21  <li>Several features require the use of the <a
22href="{@docRoot}tools/support-library/index.html">support library</a></li>
23</ul>
24
25<h2>You should also read</h2>
26
27<ul>
28  <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
29</ul>
30
31<h2>Try it out</h2>
32
33<div class="download-box">
34<a href="http://developer.android.com/shareables/training/NewsReader.zip" class="button">Download
35  the sample app</a>
36<p class="filename">NewsReader.zip</p>
37</div>
38
39</div>
40</div>
41
42<p>Android powers hundreds of device types with several different screen sizes,
43ranging from small phones to large TV sets. Therefore, it’s important
44that you design your application to be compatible with all screen sizes so it’s available to as many
45users as possible.</p>
46
47<p>But being compatible with different device types is not enough. Each screen
48size offers different possibilities and challenges for user interaction, so in
49order to truly satisfy and impress your users, your application must go beyond merely
50<em>supporting</em> multiple screens: it must <em>optimize</em> the user
51experience for each screen configuration.</p>
52
53<p>This class shows you how to implement a user interface that's
54optimized for several screen configurations.</p>
55
56<p>The code in each lesson comes from a sample application that demonstrates best practices in
57optimizing for multiple screens. You can download the sample (to the right) and use it as a source
58of reusable code for your own application.</p>
59
60<p class="note"><strong>Note:</strong> This class and the associated sample use the <a
61href="{@docRoot}tools/support-library/index.html">support library</a> in order to use the {@link
62android.app.Fragment} APIs on versions lower than Android 3.0. You must download and add the
63library to your application in order to use all APIs in this class.</p>
64
65
66<h2>Lessons</h2>
67
68<dl>
69  <dt><b><a href="screensizes.html">Supporting Different Screen Sizes</a></b></dt>
70    <dd>This lesson walks you through how to design layouts that adapts
71        several different screen sizes (using flexible dimensions for
72        views, {@link android.widget.RelativeLayout}, screen size and orientation qualifiers,
73        alias filters, and nine-patch bitmaps).</dd>
74
75  <dt><b><a href="screendensities.html">Supporting Different Screen
76        Densities</a></b></dt>
77    <dd>This lesson shows you how to support screens that have different
78        pixel densities (using density-independent pixels and providing
79        bitmaps appropriate for each density).</dd>
80
81  <dt><b><a href="adaptui.html">Implementing Adaptative UI Flows</a></b></dt>
82    <dd>This lesson shows you how to implement your UI flow in a way
83        that adapts to several screen size/density combinations
84        (run-time detection of active layout, reacting according to
85        current layout, handling screen configuration changes).</dd>
86</dl>
87