Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 1 | page.title=Progress & Activity |
Scott Main | 64d5103 | 2013-04-12 14:00:30 -0700 | [diff] [blame] | 2 | page.tags="progressbar","download","network" |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 3 | @jd:body |
| 4 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 5 | <p>Progress bars and activity indicators signal to users that something is happening that will take a moment.</p> |
| 6 | <h2 id="progress">Progress bars</h2> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 7 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 8 | <p>Progress bars are for situations where the percentage completed can be determined. They give users a quick sense of how much longer an operation will take.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 9 | |
| 10 | <img src="{@docRoot}design/media/progress_download.png"> |
| 11 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 12 | <p>A progress bar should always fill from 0% to 100% and never move backwards to a lower value. If multiple operations are happening in sequence, use the progress bar to represent the delay as a whole, so that when the bar reaches 100%, it doesn't return back to 0%.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 13 | |
| 14 | <div class="vspace size-2"> </div> |
| 15 | |
| 16 | <img src="{@docRoot}design/media/progress_themes.png"> |
| 17 | <div class="figure-caption"> |
| 18 | Progress bar in Holo Dark and Holo Light. |
| 19 | </div> |
| 20 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 21 | <h2 id="activity">Activity indicators</h2> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 22 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 23 | <p>Activity indicators are for operations of an indeterminate length. They ask users to wait a moment while something finishes up, without getting into specifics about what's happening behind the scenes.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 24 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 25 | <p>Two styles are available: a bar and a circle. Each is offered in a variety of sizes, in both Holo Light and Holo Dark themes. Choose the appropriate style and size for the surrounding context. For example, the largest activity circle works well when displayed in a blank content area, but not in a smaller dialog box. Each operation should only be represented by one activity indicator.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 26 | |
| 27 | <div class="layout-content-row"> |
| 28 | <div class="layout-content-col span-6"> |
| 29 | |
| 30 | <img src="{@docRoot}design/media/progress_activity.png"> |
| 31 | |
| 32 | </div> |
| 33 | <div class="layout-content-col span-7 with-callouts"> |
| 34 | |
| 35 | <ol> |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 36 | <li class="value-1"><h4>Activity bar</h4> |
| 37 | <p>In this example, an activity bar (in Holo Dark) appears when a user first requests a download. There's an unknown period of time when the download has not yet started. As soon as the download starts, this activity bar transforms into a progress bar.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 38 | </li> |
| 39 | </ol> |
| 40 | |
| 41 | </div> |
| 42 | </div> |
| 43 | |
| 44 | <div class="layout-content-row"> |
| 45 | <div class="layout-content-col span-6"> |
| 46 | |
| 47 | <img src="{@docRoot}design/media/progress_activity2.png"> |
| 48 | |
| 49 | </div> |
| 50 | <div class="layout-content-col span-7 with-callouts"> |
| 51 | |
| 52 | <ol> |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 53 | <li class="value-2"><h4>Activity circle</h4> |
| 54 | <p>In this example, an activity circle (in Holo Light) is used in the Gmail application when a message is being loaded because it's not possible to determine how long it will take to download the email.</p> |
| 55 | <p>When displaying an activity circle, do not include text to communicate what the app is doing. The moving circle alone provides sufficient feedback about the delay, and does so in an understated way that minimizes the impact.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 56 | <p> |
Dirk Dougherty | 0b73403 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 57 | <div style="margin-left:0;margin-top:1em;"> |
| 58 | <img src="{@docRoot}design/media/progress_activity_do_dont.png"> |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 59 | </div> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 60 | </p> |
| 61 | </li> |
| 62 | </ol> |
| 63 | |
| 64 | </div> |
| 65 | </div> |
| 66 | |
Peter Ng | 252d23d | 2012-08-07 20:19:10 -0700 | [diff] [blame] | 67 | <h2 id="custom-indicators">Custom indicators</h2> |
| 68 | <p>The standard progress bar and activity indicators work well for most situations and should be used whenever possible to provide a consistent experience across Android. However, some situations may call for something more custom.</p> |
| 69 | |
| 70 | <p>Here's an example:<br> |
| 71 | In all of the Google Play apps (Music, Books, Movies, Magazines), we wanted the current download state of each item to be visible at all times at the top-level screen. These states are: |
| 72 | <ul> |
| 73 | <li>Not downloaded</li> |
| 74 | <li>Temporarily downloaded (automatically cached by the app)</li> |
| 75 | <li>Permanently downloaded on the device at the user's request</li> |
| 76 | </ul> |
| 77 | </p> |
| 78 | <p>We also needed to indicate progress from one download state to another, because downloading is not instantaneous.</p> |
| 79 | <p>This presented a challenge, because the Google Play apps use a variety of different layouts, and some of them are highly space-constrained. We didn't want this information to clutter the top-level screens, or compete too much with the cover art.</p> |
| 80 | <p>So we designed a custom indicator that could show all of the information in a tiny footprint, with the flexibility to appear on top of content if necessary.</p> |
| 81 | |
| 82 | <img src="{@docRoot}design/media/progress_activity_custom.png"> |
| 83 | |
| 84 | <p>The color indicates whether it's downloaded (blue) or not (gray). The appearance of the pin indicates whether the download is permanent (white, upright) or temporary (gray, diagonal). And when state is in the process of changing, progress is indicated by a moving pie chart.</p> |
| 85 | |
| 86 | <div class="layout-content-row"> |
| 87 | <div class="layout-content-col span-9"> |
| 88 | <img src="{@docRoot}design/media/progress_activity_custom_app.png"> |
| 89 | </div> |
| 90 | <div class="layout-content-col span-4"> |
| 91 | <div class="figure-caption"> |
| 92 | Across Google Play apps with different layouts, the same custom indicator appears with each item. It communicates download state as well as progress, in a compact package that can be incorporated into any screen design. |
| 93 | </div> |
| 94 | </div> |
| 95 | </div> |
| 96 | |
| 97 | <p>If you find that the standard indicators aren't meeting your needs (due to space constraints, state complexities), by all means design your own. Make it feel like part of the Android family by injecting some of the visual characteristics of the standard indicators. In this example, we carried over the circular shape, the same shade of blue, and the flat and simple style.</p> |