Scott Main | 801fda5 | 2011-12-09 17:27:21 -0800 | [diff] [blame] | 1 | page.title=Designing for Multiple Screens |
Scott Main | 1c2dea0 | 2013-04-10 18:59:29 -0700 | [diff] [blame] | 2 | page.tags="tablet","tv","fragments","support" |
Scott Main | 801fda5 | 2011-12-09 17:27:21 -0800 | [diff] [blame] | 3 | |
| 4 | trainingnavtop=true |
| 5 | startpage=true |
Scott Main | 801fda5 | 2011-12-09 17:27:21 -0800 | [diff] [blame] | 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 |
Scott Main | 50e990c | 2012-06-21 17:14:39 -0700 | [diff] [blame] | 17 | href="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 Main | 801fda5 | 2011-12-09 17:27:21 -0800 | [diff] [blame] | 19 | <li>Experience building an Android <a |
| 20 | href="http://developer.android.com/guide/topics/ui/index.html"> User Interface</a></li> |
| 21 | <li>Several features require the use of the <a |
Scott Main | 4e2c9dc | 2013-07-23 19:35:17 -0700 | [diff] [blame] | 22 | href="{@docRoot}tools/support-library/index.html">support library</a></li> |
Scott Main | 801fda5 | 2011-12-09 17:27:21 -0800 | [diff] [blame] | 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, |
| 43 | ranging from small phones to large TV sets. Therefore, it’s important |
| 44 | that you design your application to be compatible with all screen sizes so it’s available to as many |
| 45 | users as possible.</p> |
| 46 | |
| 47 | <p>But being compatible with different device types is not enough. Each screen |
| 48 | size offers different possibilities and challenges for user interaction, so in |
| 49 | order 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 |
| 51 | experience for each screen configuration.</p> |
| 52 | |
| 53 | <p>This class shows you how to implement a user interface that's |
| 54 | optimized for several screen configurations.</p> |
| 55 | |
| 56 | <p>The code in each lesson comes from a sample application that demonstrates best practices in |
| 57 | optimizing for multiple screens. You can download the sample (to the right) and use it as a source |
| 58 | of 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 Main | 4e2c9dc | 2013-07-23 19:35:17 -0700 | [diff] [blame] | 61 | href="{@docRoot}tools/support-library/index.html">support library</a> in order to use the {@link |
Scott Main | 801fda5 | 2011-12-09 17:27:21 -0800 | [diff] [blame] | 62 | android.app.Fragment} APIs on versions lower than Android 3.0. You must download and add the |
| 63 | library 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> |