Класс GestureDetector
A "touch gesture" occurs when a user places one or
more fingers on the touch screen, and your application interprets that pattern of touches as a particular gesture. When a user places one or more fingers on the screen, this triggers the callback onTouchEvent() on the View that received the touch events. For each sequence of touch events (position, pressure, size, addition of another finger, etc.) that is ultimately identified as a gesture, onTouchEvent() is fired several times.
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.
Пример кода: https://git.io/vPyIl
https://developer.android.com/training/gestures/detector.html