Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 1 | page.title=Touch Feedback |
Joe Fernandez | 33baa5a | 2013-11-14 11:41:19 -0800 | [diff] [blame] | 2 | page.tags=input,button |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 3 | @jd:body |
| 4 | |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 5 | <div class="layout-content-row" style="margin-bottom: -100px"> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 6 | <div class="layout-content-col span-7"> |
| 7 | |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 8 | <p>Use illumination and dimming to respond to touches, reinforce the resulting behaviors |
| 9 | of gestures, and indicate what actions are enabled and disabled.</p> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 10 | |
| 11 | <p><strong>Be responsive to touches in a gentle way</strong>. Whenever a user touches an |
| 12 | actionable area in your app, let them know the app is "listening" by providing a visual |
| 13 | response. Make it subtle —just slightly lighter or darker than the untouched color. This |
| 14 | provides two benefits:</p> |
| 15 | |
| 16 | <ul> |
| 17 | <li><a href="{@docRoot}design/get-started/principles.html#sprinkle-encouragement">Sprinkles |
| 18 | of encouragement</a> are more pleasant than jolts.</li> |
| 19 | <li>Incorporating <a href="{@docRoot}design/style/branding.html">your branding</a> is much |
| 20 | easier because the default touch feedback works with whatever hue you choose.</li> |
| 21 | </ul> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 22 | |
Dirk Dougherty | 2a91ecb | 2013-11-05 19:06:27 -0800 | [diff] [blame] | 23 | </div> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 24 | |
Dirk Dougherty | 2a91ecb | 2013-11-05 19:06:27 -0800 | [diff] [blame] | 25 | <div class="layout-content-col span-6" style="float:right;"> |
Dirk Dougherty | 4dfd8b4 | 2013-10-11 16:09:40 -0700 | [diff] [blame] | 26 | <video class="play-on-hover" width="268" height="442" autoplay style="border:1px solid #ddd;background-color:#f9f9f9;" poster=""> |
Dirk Dougherty | 2a91ecb | 2013-11-05 19:06:27 -0800 | [diff] [blame] | 27 | <source src="{@docRoot}design/media/touch_feedback.mp4" type="video/mp4"> |
| 28 | <source src="{@docRoot}design/media/touch_feedback.webm" type="video/webm"> |
| 29 | <source src="{@docRoot}design/media/touch_feedback.ogv" type="video/ogg"> |
| 30 | </video> |
| 31 | <div class="figure-caption"> |
| 32 | <div style="color:#a3a3a3;margin-left:130px;"><em>Click image to replay...</em></div> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 33 | </div> |
| 34 | </div> |
| 35 | |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 36 | <h4 style="clear:both;">States</h4> |
| 37 | |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 38 | |
| 39 | <div class="vspace size-1"> </div> |
| 40 | |
| 41 | <img src="{@docRoot}design/media/touch_feedback_states.png"> |
| 42 | <div class="figure-caption"> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 43 | Most of Android's UI elements have touch feedback built in, including |
| 44 | states that indicate whether touching the element will have any effect. |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 45 | </div> |
| 46 | |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 47 | <div class="vspace size-3"> </div> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 48 | |
| 49 | <div class="layout-content-row"> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 50 | <div class="layout-content-col span-6"> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 51 | |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 52 | <h4>Communication</h4> |
| 53 | <p>When your objects react to more complex gestures, help users |
| 54 | understand what the outcome will be.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 55 | |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 56 | <p>In Recents, when a user starts swiping a thumbnail left or right, it |
| 57 | begins to dim. This helps the user understand that swiping will cause the |
| 58 | item to be removed.</p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 59 | </div> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 60 | <div class="layout-content-col span-7"> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 61 | |
| 62 | <img src="{@docRoot}design/media/touch_feedback_manipulation.png"> |
| 63 | |
| 64 | </div> |
| 65 | </div> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 66 | <div class="vspace size-3"> </div> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 67 | |
| 68 | <div class="layout-content-row"> |
| 69 | <div class="layout-content-col span-6"> |
| 70 | |
| 71 | <img src="{@docRoot}design/media/touch_feedback_communication.png"> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 72 | <p><em>If a user attempts to scroll past the last home screen panel, the screen |
| 73 | content tilts to the right to indicate that further navigation in this direction |
| 74 | isn’t possible.</em></p> |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 75 | |
| 76 | </div> |
| 77 | <div class="layout-content-col span-6"> |
| 78 | |
Roman Nurik | b99ae73 | 2012-03-06 12:26:15 -0800 | [diff] [blame] | 79 | <h4>Boundaries</h4> |
Dirk Dougherty | 3e529b4 | 2013-10-19 11:43:41 -0700 | [diff] [blame] | 80 | <p> |
| 81 | When users try to scroll past the beginning or end of a scrollable area, |
| 82 | communicate the boundary with a visual cue. Many of Android's scrollable UI |
| 83 | widgets, like lists and grid lists, have support for boundary feedback built |
| 84 | in. If you’re building custom widgets, keep boundary feedback in mind and |
| 85 | provide it from within your app. |
Joe Fernandez | 33baa5a | 2013-11-14 11:41:19 -0800 | [diff] [blame] | 86 | </p> |