| Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 1 | page.title=Application Structure |
| 2 | @jd:body |
| 3 | |
| 4 | <p>Apps come in many varieties that address very different needs. For example:</p> |
| 5 | <ul> |
| 6 | <li>Apps such as Calculator or Camera that are built around a single focused activity handled from a |
| 7 | single screen</li> |
| 8 | <li>Apps such as Phone whose main purpose is to switch between different activities without deeper |
| 9 | navigation</li> |
| Roman Nurik | b20f120 | 2012-03-29 13:28:13 -0700 | [diff] [blame^] | 10 | <li>Apps such as Gmail or the Play Store that combine a broad set of data views with deep navigation</li> |
| Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 11 | </ul> |
| 12 | <p>Your app's structure depends largely on the content and tasks you want to surface for your users.</p> |
| 13 | <h2 id="general-structure">General Structure</h2> |
| 14 | |
| 15 | <p>A typical Android app consists of top level and detail/edit views. If the navigation hierarchy is |
| 16 | deep and complex, category views connect top level and detail views.</p> |
| 17 | |
| 18 | <div class="layout-content-row"> |
| 19 | <div class="layout-content-col span-9"> |
| 20 | |
| 21 | <img src="{@docRoot}design/media/app_structure_overview.png"> |
| 22 | |
| 23 | </div> |
| 24 | <div class="layout-content-col span-4"> |
| 25 | |
| 26 | <h4>Top level views</h4> |
| 27 | <p>The top level of the app typically consists of the different views that your app supports. The views |
| 28 | either show different representations of the same data or expose an altogether different functional |
| 29 | facet of your app.</p> |
| 30 | <div class="vspace size-3"> </div> |
| 31 | |
| 32 | <h4>Category views</h4> |
| 33 | <p>Category views allow you to drill deeper into your data.</p> |
| 34 | <div class="vspace size-11"> </div> |
| 35 | |
| 36 | <h4>Detail/edit view</h4> |
| 37 | <p>The detail/edit view is where you consume or create data.</p> |
| 38 | |
| 39 | </div> |
| 40 | </div> |
| 41 | |
| 42 | <h2 id="top-level">Top Level</h2> |
| 43 | |
| 44 | <p>The layout of your start screen requires special attention. This is the first screen people see |
| 45 | after launching your app, so it should be an equally rewarding experience for new and frequent |
| 46 | visitors alike.</p> |
| 47 | <p>Ask yourself: "What are my typical users most likely going to want to do in my app?", and structure |
| 48 | your start screen experience accordingly.</p> |
| 49 | |
| 50 | <div class="layout-content-row"> |
| 51 | <div class="layout-content-col span-5"> |
| 52 | |
| 53 | <h4>Put content forward</h4> |
| 54 | <p>Many apps focus on the content display. Avoid navigation-only screens and instead let people get to |
| 55 | the meat of your app right away by making content the centerpiece of your start screen. Choose |
| 56 | layouts that are visually engaging and appropriate for the data type and screen size.</p> |
| 57 | |
| 58 | </div> |
| 59 | <div class="layout-content-col span-8"> |
| 60 | |
| 61 | <img src="{@docRoot}design/media/app_structure_market.png"> |
| 62 | <div class="figure-caption"> |
| Roman Nurik | b20f120 | 2012-03-29 13:28:13 -0700 | [diff] [blame^] | 63 | The Play Store app's start screen primarily allows navigation into the stores for Apps, Music, Books, |
| Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 64 | Movies and Games. It is also enriched with tailored recommendations and promotions that |
| 65 | surface content of interest to the user. Search is readily available from the action bar. |
| 66 | </div> |
| 67 | |
| 68 | </div> |
| 69 | </div> |
| 70 | |
| 71 | <div class="layout-content-row"> |
| 72 | <div class="layout-content-col span-5"> |
| 73 | |
| 74 | <h4>Set up action bars for navigation and actions</h4> |
| 75 | <p>All screens in your app should display action bars to provide consistent navigation and surface |
| 76 | important actions.</p> |
| 77 | <p>At the top level, special considerations apply to the action bar:</p> |
| 78 | <ul> |
| 79 | <li>Use the action bar to display your app's icon or title.</li> |
| 80 | <li>If your top level consists of multiple views, or if switching between data from different user |
| 81 | accounts is a significant use case, make sure that it's easy for the user to navigate between them |
| 82 | by adding view controls to your action bar.</li> |
| 83 | <li>If your app allows people to create content, consider making the content accessible right from the |
| 84 | top level.</li> |
| 85 | <li>If your content is searchable, include the Search action in the action bar so people can cut |
| 86 | through the navigation hierarchy.</li> |
| 87 | </ul> |
| 88 | |
| 89 | </div> |
| 90 | <div class="layout-content-col span-8"> |
| 91 | |
| 92 | <img src="{@docRoot}design/media/app_structure_gmail.png"> |
| 93 | <div class="figure-caption"> |
| 94 | Email is about productivity, so an efficient, easy-to-skim list with higher data density works |
| 95 | well. Navigation supports switching between accounts and recent labels. Icons for creating a |
| 96 | new message or searching are prominent in the split action bar at the bottom. |
| 97 | </div> |
| 98 | |
| 99 | </div> |
| 100 | </div> |
| 101 | |
| 102 | <div class="layout-content-row"> |
| 103 | <div class="layout-content-col span-5"> |
| 104 | |
| 105 | <h4>Create an identity for your app</h4> |
| 106 | <p>Creating an identity for your app goes beyond the action bar. Your app communicates its identity |
| 107 | through its data, the way that data is arranged, and how people interact with it. Especially for |
| 108 | media-rich applications, try to create unique layouts that showcase your data and go beyond the |
| 109 | monotony of simple list views.</p> |
| 110 | |
| 111 | </div> |
| 112 | <div class="layout-content-col span-8"> |
| 113 | |
| 114 | <img src="{@docRoot}design/media/app_structure_music_lndscp.png"> |
| 115 | <div class="figure-caption"> |
| 116 | The 3D carousel celebrates cover art and establishes a unique identity for the Music app. |
| 117 | Defaulting to the Recent view keeps the focus on music the user has been listening to lately. |
| 118 | </div> |
| 119 | |
| 120 | </div> |
| 121 | </div> |
| 122 | |
| 123 | <h2 id="categories">Categories</h2> |
| 124 | |
| 125 | <p>Generally, the purpose of a deep, data-driven app is to navigate through organizational categories |
| 126 | to the detail level, where data can be viewed and managed. Minimize perceived navigation effort by |
| 127 | keeping your apps shallow.</p> |
| 128 | <p>Even though the number of vertical navigation steps from the top level down to the detail views is |
| 129 | typically dictated by the structure of your app's content, there are several ways you can cut down |
| 130 | on the perception of onerous navigation.</p> |
| 131 | <h4>Use tabs to combine category selection and data display</h4> |
| 132 | <p>This can be successful if the categories are familiar or the number of categories is small. It has |
| 133 | the advantage that a level of hierarchy is removed and data remains at the center of the user's |
| 134 | attention. Navigating laterally between data-rich categories is more akin to a casual browsing |
| 135 | experience than to an explicit navigation step.</p> |
| 136 | |
| 137 | <div class="vspace size-1"> </div> |
| 138 | |
| 139 | <div class="layout-content-row"> |
| 140 | <div class="layout-content-col span-8"> |
| 141 | |
| 142 | <p>If the categories are familiar, predictable, or closely related, use scrolling tabs (where not all |
| 143 | items are in view simultaneously). Keep the number of scrolling tabs at a manageable level to |
| 144 | minimize navigational effort. Rule of thumb: no more than 5–7 tabs.</p> |
| 145 | |
| 146 | <img src="{@docRoot}design/media/app_structure_scrolltabs.png"> |
| 147 | <div class="figure-caption"> |
| Roman Nurik | b20f120 | 2012-03-29 13:28:13 -0700 | [diff] [blame^] | 148 | The Play Store app uses tabs to simultaneously show category choice and content. To navigate |
| 149 | between categories, users can swipe left/right on the content. |
| Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 150 | </div> |
| 151 | |
| 152 | </div> |
| 153 | <div class="layout-content-col span-5"> |
| 154 | |
| 155 | <p>If the categories in the tabs are not closely related, favor fixed tabs, so that all categories are |
| 156 | in view at the same time.</p> |
| 157 | |
| 158 | <img src="{@docRoot}design/media/app_structure_fixedtabs.png"> |
| 159 | <div class="figure-caption"> |
| 160 | YouTube uses fixed tabs to switch between different, relatively unrelated functional areas. |
| 161 | </div> |
| 162 | |
| 163 | |
| 164 | </div> |
| 165 | </div> |
| 166 | |
| 167 | <h4>Allow cutting through hierarchies</h4> |
| 168 | <p>Take advantage of shortcuts that allow people to reach their goals quicker. To allow top-level |
| 169 | invocation of actions for a data item from within list or grid views, display prominent actions |
| 170 | directly on list view items using drop-downs or split list items. This lets people invoke actions on |
| 171 | data without having to navigate all the way down the hierarchy.</p> |
| 172 | |
| 173 | <img src="{@docRoot}design/media/app_structure_shortcut_on_item.png"> |
| 174 | <div class="figure-caption"> |
| 175 | Music allows the user to act upon a data item (song) from within the category view (album), |
| 176 | thereby removing the need to navigate all the way down to the song's detail view. |
| 177 | </div> |
| 178 | |
| 179 | <h4>Acting upon multiple data items</h4> |
| 180 | <p>Even though category views mostly serve to guide people to content detail, keep in mind that there |
| 181 | are often good reasons to act on collections of data as well.</p> |
| 182 | <p>For example, if you allow people to delete an item in a detail view, you should also allow them to |
| 183 | delete multiple items in the category view. Analyze which detail view actions are applicable to |
| 184 | collections of items. Then use multi-select to allow application of those actions to multiple items |
| 185 | in a category view.</p> |
| 186 | <h2 id="details">Details</h2> |
| 187 | |
| 188 | <p>The detail view allows you to view and act on your data. The layout of the detail view depends on |
| 189 | the data type being displayed, and therefore differs widely among apps.</p> |
| 190 | |
| 191 | <div class="layout-content-row"> |
| 192 | <div class="layout-content-col span-4"> |
| 193 | |
| 194 | <h4>Layout</h4> |
| 195 | <p>Consider the activities people will perform in the detail view and arrange the layout accordingly. |
| 196 | For immersive content, make use of the lights-out mode to allow for distraction-free viewing of |
| 197 | full-screen content.</p> |
| 198 | |
| 199 | <img src="{@docRoot}design/media/app_structure_people_detail.png"> |
| 200 | |
| 201 | </div> |
| 202 | <div class="layout-content-col span-9"> |
| 203 | |
| 204 | <img src="{@docRoot}design/media/app_structure_book_detail_page_flip.png"> |
| 205 | <div class="figure-caption"> |
| 206 | Google Books' detail view is all about replicating the experience of reading an actual book. |
| 207 | The page-flip animation reinforces that notion. To create an immersive experience the app |
| 208 | enters lights-out mode, which hides all system UI affordances. |
| 209 | </div> |
| 210 | |
| 211 | <div class="figure-caption"> |
| 212 | The purpose of the People app's detail view is to surface communication options. The list view |
| 213 | allows for efficient scanning and quick access of phone numbers, email addresses and other |
| 214 | information items. Split items are used to combine calling and messaging into one compact line |
| 215 | item. |
| 216 | </div> |
| 217 | </div> |
| 218 | </div> |
| 219 | |
| 220 | <h4>Make navigation between detail views efficient</h4> |
| 221 | <p>If your users are likely to want to look at multiple items in sequence, allow them to navigate |
| 222 | between items from within the detail view. Use swipe views or other techniques, such as filmstrips, |
| 223 | to achieve this.</p> |
| 224 | |
| 225 | <img src="{@docRoot}design/media/app_structure_gmail_swipe.png"> |
| 226 | <div class="figure-caption"> |
| 227 | Gmail using swipe views to navigate from detail view to detail view. |
| 228 | </div> |
| 229 | |
| 230 | <img src="{@docRoot}design/media/app_structure_gallery_filmstrip.png"> |
| 231 | <div class="figure-caption"> |
| 232 | In addition to supporting swipe gestures to move left or right through images, Gallery provides a |
| 233 | filmstrip control that lets people quickly jump to specific images. |
| 234 | </div> |
| 235 | |
| 236 | <h2 id="checklist">Checklist</h2> |
| 237 | |
| 238 | <ul> |
| 239 | <li> |
| 240 | <p>Find ways to display useful content on your start screen.</p> |
| 241 | </li> |
| 242 | <li> |
| 243 | <p>Use action bars to provide consistent navigation.</p> |
| 244 | </li> |
| 245 | <li> |
| 246 | <p>Keep your hierarchies shallow by using horizontal navigation and shortcuts.</p> |
| 247 | </li> |
| 248 | <li> |
| 249 | <p>Use multi-select to allow the user to act on collections of data.</p> |
| 250 | </li> |
| 251 | <li> |
| 252 | <p>Allow for quick navigation between detail items with swipe views.</p> |
| 253 | </li> |
| 254 | </ul> |