From d6a463a9f23b3901bf729f2f27a6bb8f78b95248 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 21 May 2009 23:10:10 -0700 Subject: 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. --- tests/sketch/res/layout/demo.xml | 2 +- tests/sketch/res/layout/gestureviewer.xml | 2 +- tests/sketch/res/layout/overlaydemo.xml | 28 ++++++++++++++-------- .../gesture/example/ContactListGestureOverlay.java | 9 ++++--- tests/sketch/tools/Converter.java | 1 + 5 files changed, 27 insertions(+), 15 deletions(-) (limited to 'tests') diff --git a/tests/sketch/res/layout/demo.xml b/tests/sketch/res/layout/demo.xml index 8c9161a..2ef291a 100755 --- a/tests/sketch/res/layout/demo.xml +++ b/tests/sketch/res/layout/demo.xml @@ -25,7 +25,7 @@ android:drawSelectorOnTop="true" android:prompt="@string/recognition_result"/> - - - + + - - + android:layout_height="fill_parent" /> 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 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); diff --git a/tests/sketch/tools/Converter.java b/tests/sketch/tools/Converter.java index c0391d8..5db2769 100644 --- a/tests/sketch/tools/Converter.java +++ b/tests/sketch/tools/Converter.java @@ -146,6 +146,7 @@ public class Converter { long start = System.nanoTime(); + in.readShort(); iCount = in.readInt(); hCount = in.readInt(); oCount = in.readInt(); -- cgit v1.1