0PricingLogin
Jetpack Compose Academy · Lesson

Transform: Pan, Zoom & Rotate

Support pinch and multi-touch gestures.

Pinch, Zoom, Rotate

Some gestures use two fingers at once. Compose bundles pan, zoom, and rotate into a single helper called detectTransformGestures. 🤏

One Detector, Three Values

Inside pointerInput, detectTransformGestures hands you pan as an Offset, zoom as a Float scale, and rotation in degrees together.

detectTransformGestures { _, pan, zoom, rotation -> }

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