Use touch gestures

Try the Compose way
Jetpack Compose is the recommended UI toolkit for Android. Learn how to use touch and input in Compose.

This document describes how to write apps that let users interact with an app using touch gestures. Android provides a variety of APIs to help you create and detect gestures.

Although your app must not depend on touch gestures for basic behaviors—since the gestures might not be available to all users in all contexts—adding touch-based interaction to your app can greatly increase its usefulness and appeal.

To provide users with a consistent, intuitive experience, your app must follow the accepted Android conventions for touch gestures. The Material Design Gestures document shows you how to use common gestures in Android apps. Also, see Material Motion.

For more information about this topic, read the following related guides:


Detect common gestures
Learn how to detect basic touch gestures, such as scrolling, flinging, and double-tapping, using GestureDetector.
Track touch and pointer movements
Learn how to track movement.
Animate a scroll gesture
Learn how to use scrollers—Scroller or OverScroller—to produce a scrolling animation in response to a touch event.
Handle multi-touch gestures
Learn how to detect multi-pointer (finger) gestures.
Drag and scale
Learn how to implement touch-based dragging and scaling.
Manage touch events in a ViewGroup
Learn how to manage touch events in a ViewGroup to ensure that touch events are correctly dispatched to their target views.