Lines Matching full:gestures
1 page.title=Gestures
9 difficult to handle complicated gestures, sometimes requiring
12 <p>That's why we introduced a new gestures API in Android 1.6. This API, located
14 recognize gestures. This article will show you how you can use the
21 <h3>Creating a gestures library</h3>
24 on the emulator, called Gestures Builder. You can use this application to create
25 a set of pre-defined gestures for your own application. It also serves as an
26 example of how to let the user define his own gestures in your applications. You
27 can find the source code of Gestures Builders in the samples directory of each
28 SDK platform. In our example we will use Gestures Builder to generate a set of
29 gestures for us (make sure to create an AVD with an SD card image to use
30 Gestures Builder.) The screenshot below shows what the application looks like
31 after adding a few gestures:</p>
38 gestures with the same name to increase the precision of the recognition. Every
39 time you add or edit a gesture in the Gestures Builder, a file is generated on
40 the emulator's SD card, <code>/sdcard/gestures</code>. This file contains the
41 description of all the gestures, and you will need to package it inside your
45 <h3>Loading the gestures library</h3>
47 <p>Now that you have a set of pre-defined gestures, you must load it inside your
64 <h3>Recognizing gestures</h3>
66 <p>To start recognizing gestures in your application, all you have to do
70 android:id="@+id/gestures"
78 drawing board on which the user can draw his gestures. You can tweak
80 used to draw gestures, and register various listeners to follow what
85 <pre>GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
86 gestures.addOnGesturePerformedListener(this);</pre>
91 the Gestures Builder - and a score. The list is sorted by descending
114 recognize pre-defined gestures (see the source code of the project
117 <img src="images/gestures.png" style="width: 320px; height: 480px;">
119 <h3>Gestures overlay</h3>
124 of other views. This can be useful to recognize gestures in a game or
127 contacts. We start again in Gestures Builder to create a new set of
128 pre-defined gestures:</p>
136 android:id="@+id/gestures"
151 <p>In this application, the gestures view is an overlay on top of a regular
157 whether we want to recognize gestures made of a single stroke or
158 multiple strokes. Since one of our gestures is the "+" symbol, we need
167 the list scrolls vertically, which means that any horizontal gestures
169 gesture. Gestures that start with a vertical stroke must contain at
175 <p>The code used to load and set up the gestures library and overlay is exactly
193 <p>The user is now able to draw his gestures on top of the list without
207 <p>Adding support for gestures in your application is easy and can be a valuable
208 addition. The gestures API does not even have to be used to recognize complex
210 excited by the possibilities the gestures API offers, and we're eager to see