Consumer app
Moving an Android app from XML views to Jetpack Compose
A screen-by-screen approach to adopting Compose in an established Android app.
Illustrative example. This describes a common mobile challenge and an approach Dragonfly consultants could take. It is not a client engagement and does not report real results.
The challenge
The app uses XML layouts throughout. A full rewrite was not possible, but new features were slow to build with the existing layout system.
The approach
- Build all new features in Compose and host them inside the existing app.
- Convert shared components such as cards, list items and dialogs first.
- Move screen state into ViewModels so the UI can be rebuilt without changing business logic.
- Measure startup time and recomposition on mid-range devices throughout the migration.
What success would look like
New screens built faster, a consistent component library, and a clear schedule for converting the remaining XML screens.
Want to see how this would apply to your product? Tell us about your project.