I recently introduced multi-gesture gestures into my application. This is preference, so I dynamically set StrokeType to Activity.OnCreate. I found that if you dynamically install StrokeType, it changes the behavior of the GestureOverlayView as follows.
The normal behavior is that you draw a gesture, and it stays on the screen after you draw it. However, when a stroke type is dynamically changed, any gesture drawn on the screen disappears immediately after the OnGestureEnded event has been fired. I reloaded the GesturesBuilder sample application and confirmed that it has the same problem if you added the second line shown here:
GestureOverlayView overlay = (GestureOverlayView) findViewById(R.id.gestures_overlay);
overlay.setGestureStrokeType(GestureOverlayView.GESTURE_STROKE_TYPE_SINGLE);
overlay.addOnGestureListener(new GesturesProcessor());
}
Is this a bug in the Android gesture library and does anyone know a workaround?
Please note that this is on HTC Magic, so this may be a handset problem.
source
share