diff options
author | Romain Guy <romainguy@android.com> | 2009-05-21 23:10:10 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-05-22 01:59:59 -0700 |
commit | d6a463a9f23b3901bf729f2f27a6bb8f78b95248 (patch) | |
tree | 1371cafd6a1c0fe8d3cd4580e7878a9adb86b183 /tests/sketch/src | |
parent | cfcc0df2658d0ce7dc753511bb44ab8ae7a636f7 (diff) | |
download | frameworks_base-d6a463a9f23b3901bf729f2f27a6bb8f78b95248.zip frameworks_base-d6a463a9f23b3901bf729f2f27a6bb8f78b95248.tar.gz frameworks_base-d6a463a9f23b3901bf729f2f27a6bb8f78b95248.tar.bz2 |
Add a new API to ListView: setGestures(int). This allows developers to enable gestures to jump inside the list or filter it. This change also introduces a new XML attribute to control this API. It also adds the ability to theme the GestureOverlayView from the gestures library. Finally, this adds a new VERSION header to the binary format used to store the letters for the recognizer.
Diffstat (limited to 'tests/sketch/src')
-rw-r--r-- | tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java b/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java index eda4224..f3081b7 100644 --- a/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java +++ b/tests/sketch/src/com/android/gesture/example/ContactListGestureOverlay.java @@ -101,9 +101,12 @@ public class ContactListGestureOverlay extends Activity { public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) { ArrayList<Prediction> predictions = mRecognizer.recognize(gesture); if (!predictions.isEmpty()) { - Log.v(LOGTAG, "1st Prediction : " + predictions.get(0).name); - Log.v(LOGTAG, "2nd Prediction : " + predictions.get(1).name); - Log.v(LOGTAG, "3rd Prediction : " + predictions.get(2).name); + Log.v(LOGTAG, "1st Prediction : " + predictions.get(0).name + + " @" + predictions.get(0).score); + Log.v(LOGTAG, "2nd Prediction : " + predictions.get(1).name + + " @" + predictions.get(1).score); + Log.v(LOGTAG, "3rd Prediction : " + predictions.get(2).name + + " @" + predictions.get(2).score); int index = mContactAdapter.search(predictions.get(0).name); if (index != -1) { mContactList.setSelection(index); |