Tap it! Shake it! Fling it! Sheep it!
summary
Builds a tappable, draggable, flingable and shoppable Canvas chip using Jetpack Compose and Kotlin Multiplatform with working code on GitHub. Tap toggles scale between 1 and 1.2 using the animatable API and a spring spec, drag uses dragable2D with snapTo for zero input lag, fling computes a target with decay+animateDecay and bounces back to center if out of bounds, device orientation drives independent rotation animatables, and a copied shake detector triggers simultaneous keyframe animations for roll translation and scale. All examples run in the Android emulator or on device.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:12Animations with gestures
- 7:06Tap to scale
- 11:08Drag and reposition
- 15:01Fling with decay
- 20:35Sensor manager setup
- 23:27Rotation shift
- 25:31Shake with keyframes
- 31:11Summary
related talks
32mThe Gesture Animations Dance
36mPractical Magic with Animations in Compose
51mJetpack Compose for Games & Animations
32mPractical Magic with Animations in Compose
21mThe Curious Case of Android Gesture Animation
37mJetpack Compose for Games & Animations
47mAnimations with Compose: Make Your Apps Shimmering
28mComposable Sheep: A Compose Animations Journey
