Mobile development

Stage 2 · Lesson 2 of 10

Previews and Live Edit

Jetpack Compose UI

Mark a with @Preview and draws it in the design pane without running the app. take settings such as uiMode for , fontScale for large text and device for screen sizes. You can stack several annotations to see one card in many states.

A Compose Preview needs a composable that takes plain data, not a , which also pushes you towards better design. Live Edit updates a running app on a device or emulator as you type, for many changes inside composable bodies. Bigger structural changes still need a rebuild.

Common trappreviewing only the happy case, never an empty list, a very long name or dark mode.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with

Practise

  • Use a free challenge's mobile design image as the spec for a native screen

Keep handy

  • Spacing, type scale, colour and component specs your screens should follow

Mark this stage as not done?