Home | History | Annotate | Download | only in articles

Lines Matching full:touch

1 page.title=Touch Mode
4 <p>This article explains the <em>touch mode</em>, one of the most
7 <p>The touch mode is a state of the view hierarchy that depends solely on the
8 user interaction with the phone. By itself, the touch mode is something very
10 performed with the touch screen. For example, if you are using an
12 of touch mode; however, if you touch a button on the screen with your finger,
13 you will enter touch mode. When the user is not in touch mode, we talk about the
17 <p>There is only one API directly related to touch mode,
20 <p>Sounds easy enough, right? Oddly enough, touch mode is deceivingly simple and
21 the consequences of entering touch mode are far greater than you might
24 <h4>Touch Mode, Selection, and Focus</h4>
28 a touch screen, some require a stylus, some have both a touch screen and a
31 all the possible issues that could arise. One issue led us to create the touch
37 and fling the list using the touch screen. The issue in this scenario is
39 through the touch screen. </p>
49 when the user manipulates the UI through the touch screen.</p>
51 <p>In touch mode, there is no focus and no selection. Any selected item in a
52 list of in a grid becomes unselected as soon as the user enters touch
54 enters touch mode. The image below illustrates what happens when the
62 resurrect the selection/focus whenever the user leaves touch mode. For
67 their application is in touch mode, and they need to use the trackball
68 to exit touch mode and resurrect the focus.</p>
70 <p>The relationship between touch mode, selection, and focus means you must not
74 In touch mode, this method will return
81 <h4>Focusable in Touch Mode</h4>
83 <p>In general, focus doesn't exist in touch mode. However, focus can exist in
84 touch mode in a very special way called <em>focusable</em>. This special mode
92 touches the screen, the application will enter touch mode if it wasn't
93 in touch mode already. What happens during the transition to
94 touch mode depends on what the user touched, and what currently has
95 focus. If the user touches a widget that is focusable in touch
97 focused widget will not retain focus unless it is focusable in touch
103 <p>Fousable in touch mode (see
109 touch mode property. MapView, if used in fullscreen as in Google Maps, is
110 another good example of where you can use focusable in touch mode correctly.</p>
112 <p>Below is another example of a focusable in touch mode widget. When the user
119 <p>Developers new to Android often think that focusable in touch mode is the
124 you need to handle user interactions without using focusable in touch mode. For
129 <h4>Touch Mode Cheat Sheet</h4>
134 <li>Use focusable in touch mode if you write a game</li>
138 <ul><li>Do not try to keep the focus or selection in touch mode</li></ul>