blob: 9f36fed60ec21dfdd221ba6159713f39417444a0 [file] [log] [blame]
Roman Nurikb99ae732012-03-06 12:26:15 -08001page.title=Touch Feedback
Joe Fernandez33baa5a2013-11-14 11:41:19 -08002page.tags=input,button
Roman Nurikb99ae732012-03-06 12:26:15 -08003@jd:body
4
Dirk Dougherty3e529b42013-10-19 11:43:41 -07005 <div class="layout-content-row" style="margin-bottom: -100px">
Roman Nurikb99ae732012-03-06 12:26:15 -08006 <div class="layout-content-col span-7">
7
Dirk Dougherty3e529b42013-10-19 11:43:41 -07008<p>Use illumination and dimming to respond to touches, reinforce the resulting behaviors
9of gestures, and indicate what actions are enabled and disabled.</p>
Dirk Dougherty3e529b42013-10-19 11:43:41 -070010
11<p><strong>Be responsive to touches in a gentle way</strong>. Whenever a user touches an
12actionable area in your app, let them know the app is "listening" by providing a visual
13response. Make it subtle &mdash;just slightly lighter or darker than the untouched color. This
14provides two benefits:</p>
15
16<ul>
17<li><a href="{@docRoot}design/get-started/principles.html#sprinkle-encouragement">Sprinkles
18of encouragement</a> are more pleasant than jolts.</li>
19<li>Incorporating <a href="{@docRoot}design/style/branding.html">your branding</a> is much
20easier because the default touch feedback works with whatever hue you choose.</li>
21</ul>
Roman Nurikb99ae732012-03-06 12:26:15 -080022
Dirk Dougherty2a91ecb2013-11-05 19:06:27 -080023</div>
Dirk Dougherty3e529b42013-10-19 11:43:41 -070024
Dirk Dougherty2a91ecb2013-11-05 19:06:27 -080025<div class="layout-content-col span-6" style="float:right;">
Dirk Dougherty4dfd8b42013-10-11 16:09:40 -070026 <video class="play-on-hover" width="268" height="442" autoplay style="border:1px solid #ddd;background-color:#f9f9f9;" poster="">
Dirk Dougherty2a91ecb2013-11-05 19:06:27 -080027 <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 Nurikb99ae732012-03-06 12:26:15 -080033 </div>
34</div>
35
Dirk Dougherty3e529b42013-10-19 11:43:41 -070036<h4 style="clear:both;">States</h4>
37
Roman Nurikb99ae732012-03-06 12:26:15 -080038
39<div class="vspace size-1">&nbsp;</div>
40
41<img src="{@docRoot}design/media/touch_feedback_states.png">
42<div class="figure-caption">
Dirk Dougherty3e529b42013-10-19 11:43:41 -070043 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 Nurikb99ae732012-03-06 12:26:15 -080045</div>
46
Dirk Dougherty3e529b42013-10-19 11:43:41 -070047<div class="vspace size-3">&nbsp;</div>
Roman Nurikb99ae732012-03-06 12:26:15 -080048
49<div class="layout-content-row">
Dirk Dougherty3e529b42013-10-19 11:43:41 -070050 <div class="layout-content-col span-6">
Roman Nurikb99ae732012-03-06 12:26:15 -080051
Dirk Dougherty3e529b42013-10-19 11:43:41 -070052 <h4>Communication</h4>
53<p>When your objects react to more complex gestures, help users
54understand what the outcome will be.</p>
Roman Nurikb99ae732012-03-06 12:26:15 -080055
Dirk Dougherty3e529b42013-10-19 11:43:41 -070056<p>In Recents, when a user starts swiping a thumbnail left or right, it
57begins to dim. This helps the user understand that swiping will cause the
58item to be removed.</p>
Roman Nurikb99ae732012-03-06 12:26:15 -080059 </div>
Dirk Dougherty3e529b42013-10-19 11:43:41 -070060 <div class="layout-content-col span-7">
Roman Nurikb99ae732012-03-06 12:26:15 -080061
62 <img src="{@docRoot}design/media/touch_feedback_manipulation.png">
63
64 </div>
65</div>
Dirk Dougherty3e529b42013-10-19 11:43:41 -070066<div class="vspace size-3">&nbsp;</div>
Roman Nurikb99ae732012-03-06 12:26:15 -080067
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 Dougherty3e529b42013-10-19 11:43:41 -070072 <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 Nurikb99ae732012-03-06 12:26:15 -080075
76 </div>
77 <div class="layout-content-col span-6">
78
Roman Nurikb99ae732012-03-06 12:26:15 -080079<h4>Boundaries</h4>
Dirk Dougherty3e529b42013-10-19 11:43:41 -070080<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 youre building custom widgets, keep boundary feedback in mind and
85 provide it from within your app.
Joe Fernandez33baa5a2013-11-14 11:41:19 -080086</p>