What is the difference between GestureDetector Class and the GestureDetectorCompat class? Both to do the same thing(deal with gestures) but which one should I use?
Detect gestures. Android provides the GestureDetector class for detecting common gestures. Some of the gestures it supports include onDown() , onLongPress() , onFling() , and so on. You can use GestureDetector in conjunction with the onTouchEvent() method described above.
GestureDetectorCompat enables your to use all of the GestureDetector capability on old android version. That's all.
So you probably want to use the compat version which has identical APIs.
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