Previews and Hot Reload
Iterate quickly with Compose previews.
Design-Time Previews
One of Compose's best features is the @Preview: you can see a composable rendered inside Android Studio without running the app on a device or emulator.
The @Preview Annotation
Add @Preview above a @Composable function. Android Studio renders it in the design pane.
@Preview
@Composable
fun GreetingPreview() {
Greeting(name = "Preview")
}All lessons in this course
- What Is Jetpack Compose?
- Your First Composable
- Text, Image, and Button
- Previews and Hot Reload