I am using GestureOverlayView with ViewFlipper, and it takes about one second for the android to recognize my gesture and flip to next view. However, the Android calendar flips almost immediately. I checked the Android calendar code, and it uses GestureDetector. Is there big difference between these two gesture detecting mechanisms?
I am also wondering what's the difference between these two mechanism of detecting gestures. I know GestureOverlayView came out at 1.6, while GestureDetector was in 1.0. But why didn't they just deprecate GestureDetector when GestureOverlayView came out?
These two components have two different goals. GestureDetector is meant to detect common, simple and non visual gestures like scrolls, flings, swipes, etc. GestureOverlayView is meant to detect complex gestures (arbitrary shapes, letters, etc.) that are drawn on screen. Because of its nature GestureOverlayView relies on timings before it starts recognizing a shape. It's not a matter of performance. If all you want to do is detect a swipe, just use a GestureDetector.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With