blob: 2d34b2870721742fa62b53ca3246af25b34710fa [file] [log] [blame]
Scott Main801fda52011-12-09 17:27:21 -08001page.title=Designing for Multiple Screens
Scott Main1c2dea02013-04-10 18:59:29 -07002page.tags="tablet","tv","fragments","support"
Scott Main801fda52011-12-09 17:27:21 -08003
4trainingnavtop=true
5startpage=true
Scott Main801fda52011-12-09 17:27:21 -08006
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
Scott Main50e990c2012-06-21 17:14:39 -070017href="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>
Scott Main801fda52011-12-09 17:27:21 -080019 <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
Scott Main4e2c9dc2013-07-23 19:35:17 -070022href="{@docRoot}tools/support-library/index.html">support library</a></li>
Scott Main801fda52011-12-09 17:27:21 -080023</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, its important
44that you design your application to be compatible with all screen sizes so its 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
Scott Main4e2c9dc2013-07-23 19:35:17 -070061href="{@docRoot}tools/support-library/index.html">support library</a> in order to use the {@link
Scott Main801fda52011-12-09 17:27:21 -080062android.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>