1page.title=Planning for Multiple Touchscreen Sizes 2parent.title=Designing Effective Navigation 3parent.link=index.html 4 5trainingnavtop=true 6previous.title=Planning Screens and Their Relationships 7previous.link=screen-planning.html 8next.title=Providing Descendant and Lateral Navigation 9next.link=descendant-lateral.html 10 11meta.tags="multiple screens" 12page.metaDescription=Designing an intuitive, effective navigation for tablets and other devices. 13page.image=/images/training/app-navigation-multiple-sizes-strategy-stack.png 14 15@jd:body 16 17<div id="tb-wrapper"> 18<div id="tb"> 19 20<h2>This lesson teaches you to</h2> 21<ol> 22 <li><a href="#multi-pane-layouts">Group Screens with Multi-pane Layouts</a></li> 23 <li><a href="#orientations">Design for Multiple Tablet Orientations</a></li> 24 <li><a href="#group-screens">Group Screens in the Screen Map</a></li> 25</ol> 26 27<h2>You should also read</h2> 28<ul> 29 <li><a href="{@docRoot}design/patterns/multi-pane-layouts.html">Android Design: Multi-pane Layouts</a></li> 30 <li><a href="{@docRoot}training/multiscreen/index.html">Designing for Multiple Screens</a></li> 31</ul> 32 33</div> 34</div> 35 36 37<p>The exhaustive screen map from the previous lesson isn't tied to a particular device form factor, although it can generally look and work okay on a handset or similar-size device. But Android applications need to adapt to a number of different types of devices, from 3" handsets to 10" tablets to 42" TVs. In this lesson we explore reasons and tactics for grouping together multiple screens from the exhaustive map.</p> 38 39<p class="note"><strong>Note: </strong> Designing applications for television sets also requires attention to other factors, including interaction methods (i.e., the lack of a touch screen), legibility of text at large reading distances, and more. Although this discussion is outside the scope of this class, you can find more information on designing for TVs in the <a href="https://developers.google.com/tv">Google TV</a> documentation for <a href="https://developers.google.com/tv/android/docs/gtv_android_patterns">design patterns</a>.</p> 40 41<h2 id="multi-pane-layouts">Group Screens with Multi-pane Layouts</h2> 42 43<div class="note design"> 44<p><strong>Multi-pane Layout Design</strong></p> 45 <p>For design guidelines, read Android Design's <a 46 href="{@docRoot}design/patterns/multi-pane-layouts.html">Multi-pane Layouts</a> pattern guide.</p> 47</div> 48 49<p>3 to 4-inch screens are generally only suitable for showing a single vertical pane of content at a time, be it a list of items, or detail information about an item, etc. Thus on such devices, screens generally map one-to-one with levels in the information hierarchy (<em>categories</em> → <em>object list</em> → <em>object detail</em>).</p> 50 51<p>Larger screens such as those found on tablets and TVs, on the other hand, generally have much more available screen space and are able to present multiple panes of content. In landscape, panes are usually ordered from left to right in increasing detail order. Users are especially accustomed to multiple panes on larger screens from years and years of desktop application and desktop web site use. Many desktop applications and websites offer a left-hand navigation pane or use a master/detail two-pane layout.</p> 52 53<p>In addition to addressing these user expectations, it's usually necessary to provide multiple panes of information on tablets to avoid leaving too much whitespace or unwittingly introducing awkward interactions, for example 10 x 0.5-inch buttons.</p> 54 55<p>The following figures demonstrate some of the problems that can arise when moving a UI (user interface) design into a larger layout and how to address these issues with multi-pane layouts:</p> 56 57 58<img src="{@docRoot}images/training/app-navigation-multiple-sizes-multipane-bad.png" 59 alt="Single pane layouts on large screens in landscape lead to awkward whitespace and exceedingly long line lengths" id="figure-multipane-bad"> 60 61<p class="img-caption"><strong>Figure 1.</strong> Single pane layouts on large screens in landscape lead to awkward whitespace and exceedingly long line lengths.</p> 62 63 64<img src="{@docRoot}images/training/app-navigation-multiple-sizes-multipane-good.png" 65 alt="Multi-pane layouts in landscape offer better a visual balance while offering more utility and legibility" id="figure-multipane-good"> 66 67<p class="img-caption"><strong>Figure 2.</strong> Multi-pane layouts in landscape result in a better visual balance while offering more utility and legibility.</p> 68 69 70<p class="note"><strong>Implementation Note:</strong> After deciding on the screen size at which to draw the line between single-pane and multi-pane layouts, you can provide different layouts containing one or multiple panes for devices in varying screen size buckets (such as <code>large</code>/<code>xlarge</code>) or varying minimum screen widths (such as <code>sw600dp</code>).</p> 71 72<p class="note"><strong>Implementation Note:</strong> While a single screen is implemented as an {@link android.app.Activity} subclass, individual content panes can be implemented as {@link android.app.Fragment} subclasses. This maximizes code re-use across different form factors and across screens that share content.</p> 73 74 75<h2 id="orientations">Design for Multiple Tablet Orientations</h2> 76 77<p>Although we haven't begun arranging user interface elements on our screens yet, this is a good time to consider how your multi-pane screens will adapt to different device orientations. Multi-pane layouts in landscape work quite well because of the large amount of available horizontal space. However, in the portrait orientation, your horizontal space is more limited, so you may need to design a separate layout for this orientation.</p> 78 79<p>Below are a few common strategies for creating portrait tablet layouts.</p> 80 81<ul> 82 <li><strong>Stretch</strong> 83 <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-stretch.png" 84 alt="Stretch strategy"> 85 <p>The most straightforward strategy is to simply stretch each pane's width to best present the content in each pane in the portrait orientation. Panes could have fixed widths or take a certain percentage of the available screen width.</p></li> 86 87 <li><strong>Expand/collapse</strong> 88 <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-collapse.png" 89 alt="Expand/collapse strategy"> 90 <p>A variation on the stretch strategy is to collapse the contents of the left pane when in portrait. This works quite well with master/detail panes where the left (master) pane contains easily collapsible list items. An example would be for a realtime chat application. In landscape, the left list could contain chat contact photos, names, and online statuses. In portrait, horizontal space could be collapsed by hiding contact names and only showing photos and online status indicator icons. Optionally also provide an expand control that allows the user to expand the left pane content to its larger width and vice versa.</p></li> 91 92 <li><strong>Show/Hide</strong> 93 <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-show-hide.png" 94 alt="Show/Hide strategy"> 95 <p>In this scenario, the left pane is completely hidden in portrait mode. However, <em>to ensure the functional parity</em> of your screen in portrait and landscape, the left pane should be made available via an onscreen affordance (such as a button). It's usually appropriate to use the <em>Up</em> button in the Action Bar (<a href="{@docRoot}design/patterns/actionbar.html">pattern docs</a> at Android Design) to show the left pane, as is discussed in a <a href="ancestral-temporal.html">later lesson</a>.</p></li> 96 97 <li><strong>Stack</strong> 98 <img src="{@docRoot}images/training/app-navigation-multiple-sizes-strategy-stack.png" 99 alt="Stack strategy"> 100 <p>The last strategy is to vertically stack your normally horizontally-arranged panes in portrait. This strategy works well when your panes aren't simple text-based lists, or when there are multiple blocks of content running along the primary content pane. Be careful to avoid the awkward whitespace problem discussed above when using this strategy.</p></li> 101 102</ul> 103 104 105<h2 id="group-screens">Group Screens in the Screen Map</h2> 106 107<p>Now that we are able to group individual screens together by providing multi-pane layouts on larger-screen devices, let's apply this technique to our exhaustive screen map from the <a href="screen-planning.html">previous lesson</a> to get a better sense of our application's hierarchy on such devices:</p> 108 109 110<img src="{@docRoot}images/training/app-navigation-multiple-sizes-multipane-screen-map.png" 111 alt="Updated example news application screen map for tablets" id="figure-multipane-screen-map"> 112 113<p class="img-caption"><strong>Figure 3.</strong> Updated example news application screen map for tablets.</p> 114 115 116<p>In the next lesson we discuss <em>descendant</em> and <em>lateral</em> navigation, and explore more ways of grouping screens to maximize the intuitiveness and speed of content access in the application's user interface.</p> 117