Advanced Android Canvas APIs
summary
A canvas recorder is implemented to intercept and save Canvas commands for Android session replay, forwarding commands to the real Canvas while recording; a material button produces 12 drawing commands on View-based UI versus 49 calls in Jetpack Compose in the example; coordinate-space conversion uses matrix.setPolyToPoly instead of manual math; a bubble packer plus animation uses an inverted progress with postRotate/postScale to map points and draw circles.
AI-written summary · about
chapters (12)
- 0:00Introduction and sponsor
- 3:20Session replay on Android
- 4:44What is Canvas API
- 6:56Canvas state management
- 7:18Performance optimizations
- 10:08Canvas operations in practice
- 12:39Jetpack Compose canvas calls
- 13:20Bubble chart example
- 15:07Matrix transformations
- 16:13Animated matrix effects
- 17:15Advanced drawing techniques
- 18:00Conclusion and resources
related talks
42mAndroid Graphics: the Path to [UI] Riches
31mComposing in your Canvas!
49mCustom Drawing with Canvas
16mAndroid Graphics
47mRewind and Resolve: A deep dive into building Session Replay for Android
32mA Skeptics Guide to Programmatic Views on Android
37mAndroid Canvas: Building one of the worlds largest Interactive DataViz exp.
43mInteracting with Composable Canvas
