📱Jetpack Compose
Also known as Compose, Android Compose, Compose UI
Android's way to build app screens in Kotlin, from small blocks.
Think of it like
Think of it like building with blocks. Each small block is one part of the screen.
Example
Jack builds a login screen in Compose from three blocks: two text boxes and one button.
Why it matters
Definition
Example code
kotlin
@Composable
fun Greeting() {
Button(onClick = { println("Hi") }) {
Text("Say hi")
}
}Common mistake
Key takeaways
- 1Small blocks. Each part of the screen is one function.
- 2Updates itself. A change in data redraws that part.
- 3Kotlin first. Screens are written in Kotlin, not XML.