Mobile apps

What is Jetpack Compose?

Jetpack Compose is Google's recommended toolkit for building Android user interfaces. Instead of XML layout files, developers describe each screen as Kotlin functions, and the screen redraws itself when the underlying data changes.

Why it replaced XML layouts

The older approach split a screen between XML and Java or Kotlin code that had to be kept in sync by hand. In Compose, one function says what the screen looks like for a given state. Less glue code means fewer bugs and faster iteration, with live previews inside Android Studio.

Compared with other toolkits

It is the Android counterpart of SwiftUI on Apple platforms, and it shares ideas with Flutter and React: declarative UI built from small reusable pieces.

What to check on a project

  • Older apps often mix XML screens and Compose screens during a gradual migration, which is fine.
  • Very old devices are still supported, but custom widgets built for the old system may need rewriting.
  • Design systems map neatly onto Compose themes, so brand colors and typography are defined once.

Questions, answered

Rarely all at once. Most teams write new screens in Compose and convert old ones when they are already being changed.

Yes for Android. Flutter apps use Flutter's own widgets instead.

By the Stegnor team · Updated