GestureLibrary 有时会在recognize()
为什么?我能做些什么来防止这种情况发生?
12-28 22:25:06.118: E/DrawActivity(29717): java.lang.IndexOutOfBoundsException: 无效索引 0,大小为 0 12-28
22:25:06.118: E/DrawActivity(29717): 在 java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
12-28 22:25:06.118: E/DrawActivity(29717): 在 java.util.ArrayList.get(ArrayList.java:304)
12-28 22:25:06.118: E/DrawActivity(29717): 在 android.gesture.Instance.temporalSampler(Instance.java:91)
12-28 22:25:06.118: E/DrawActivity(29717): 在 android.gesture.Instance.createInstance(Instance.java:76)
12-28 22:25:06.118: E/DrawActivity(29717): 在 android.gesture.GestureStore.recognize(GestureStore.java:137)
12-28 22:25:06.118: E/DrawActivity(29717): 在 android.gesture.GestureLibrary.recognize(GestureLibrary.java:64)
编辑:手势是通过以下方式捕获的:
<android.gesture.GestureOverlayView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gesture_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:eventsInterceptionEnabled="true"
android:fadeEnabled="false"
android:gestureStrokeAngleThreshold="0."
android:gestureStrokeSquarenessThreshold="0."
android:gestureStrokeType="single"
android:orientation="vertical"/>