0Pricing
Jetpack Compose Academy · Lesson

pointerInput & detectTapGestures

Detect tap, double-tap, and long press.

The Gateway to Touch

To handle raw touch in Compose you reach for the pointerInput modifier. It gives any element a place to read finger events directly. 👆

Add It to Any Composable

Attach pointerInput in a Modifier chain. Inside its lambda you get a gesture scope where you can listen for taps, drags, and more.

Box(Modifier.pointerInput(Unit) {
  // gesture detectors go here
})

All lessons in this course

  1. pointerInput & detectTapGestures
  2. Drag, Swipe & Fling
  3. Transform: Pan, Zoom & Rotate
  4. Nested Scroll Connections
← Back to Jetpack Compose Academy