Let's think about it for a second
Column arranges its child composables vertically (top to bottom) — Row arranges them horizontally (left to right). Box places its child composables on top of one another (overlapping), which is handy for things like a text overlay on an image. Modifier is the toolkit you use to customize a composable's appearance/behavior (padding, size, background color, clickable) by chaining calls together, like `.padding(16.dp).background(Color.Blue)`.
Let's connect this to a real-world scenario
When designing a login screen, you could stack the logo (Image), email TextField, password TextField, and login Button vertically inside a `Column` — adding `Modifier.padding(16.dp)` to the Column gives you spacing between the screen edges and the content.
Let's look at an example together
@Composable
fun LoginScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text("Welcome Back", fontSize = 24.sp)
Spacer(modifier = Modifier.height(16.dp))
Row {
Icon(Icons.Default.Email, contentDescription = null)
Text("email@example.com")
}
}
}You should see, on the emulator, an email icon plus text laid out as a row below the 'Welcome Back' text.Try it in 5 minutes
Expand `LoginScreen` yourself — add email/password TextFields and a Login Button inside the Column, then run it on the emulator.
A quick word of caution
Overusing `Modifier.fillMaxSize()` on nested composables can make it hard to predict the actual layout size — use it only at the root level, and use specific sizes/weights for children instead.