Composifying Your Not-Compose Code
summary
Shows how the Google Maps SDK is wrapped into a working Compose API by building android-maps-compose using the Android View composable, a bespoke map lifecycle state machine, and observers wired via localLifecycleOwner and DisposableEffect so mapView.onCreate/onResume/etc. are called correctly. It exposes declarative state holders like remember/savable cameraPositionState and marker composables, prevents leaks/crashes, and warns performance degrades when rendering thousands of markers.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 2:15World before Jetpack Compose
- 4:25Jetpack Compose rise
- 5:50Interoperability challenges
- 6:33AndroidView composable
- 9:08Lifecycle management
- 10:51DisposableEffect
- 11:59Composifying Google Maps SDK
- 16:41Map lifecycle state machine
- 20:15Declarative Compose API
- 23:29Camera position state
- 27:51User interactions
- 29:56API structure
- 32:03Markers declaratively
- 35:41Remember function
- 36:03Composifying checklist
- 37:29Performance optimizations
- 39:55Final thoughts
related talks
36mLessons Learned Migrating the Maps SDK to Compose
30mLessons Learned Migrating the Maps SDK to Compose
28mHow easy is it to draw on GoogleMaps using Compose?
36mHow easy is it to draw on GoogleMaps using Compose?
40mGetting started with the Maps SDK for Android
29mReworking a Core Feature: Migrating from XML to Compose Maps
48mLearning Jetpack Compose By Example
45mOn the road to Jetpack Compose
