How do you arrange UI elements in Jetpack Compose?

Tests your grasp of Compose's declarative layout model. Explain Row (horizontal) and Column (vertical) as the core layout composables. Define Modifier as the standard way to configure size, spacing, and behavior.
What's really being asked
This is a foundational question checking your understanding of Compose's declarative UI paradigm. It's not just about knowing the names Row and Column. It tests if you grasp that layout is achieved by composing functions, and that configuration is done via a standardized, powerful Modifier system. This is a significant departure from the XML/View system's multiple properties and methods. For a senior candidate, clarity and precision are key.
The full answer
A strong answer covers three main points in order. First, identify the primary layout composables: Column for arranging children vertically and Row for arranging them horizontally. Second, explain the Modifier parameter. Describe it as the standard, idiomatic way in Compose to modify a composable's appearance and behavior. Mention that modifiers are chained together, and the order matters. For example, padding before clickable affects a different touch area than clickable before padding. Third, give examples of what Modifier can do, such as setting size (.size(), .fillMaxWidth()), adding space (.padding()), applying decorations (.background()), and adding behavior (.clickable()).
The mistakes people make
A major red flag is treating Modifier as an afterthought or only mentioning one or two functions like padding. This suggests a shallow understanding. A candidate who says "it's for styling" is missing the point that it also controls layout constraints and user interaction. Another weak answer is simply analogizing to LinearLayout without explaining the "how" in Compose—that these are just functions emitting UI, not View objects being inflated and managed. Finally, fumbling the names or confusing Column with LazyColumn without being prompted indicates a lack of precision.
What usually comes next
Expect questions about how to arrange children within a Row or Column using horizontalArrangement and verticalAlignment. A good follow-up is "How would you center a child within a Column both horizontally and vertically?". Another is "Explain the difference between Modifier.weight() and Modifier.width()." or "What is a Box and when would you use it instead of a Row or Column?".
A concrete example
To place an Icon and Text side-by-side with 8dp of space between them, you would use a Row. Inside the Row, you'd place the Icon composable, then the Text composable. To add space, you could apply Modifier.padding(start = 8.dp) to the Text element. A more robust way is to use Arrangement.spacedBy(8.dp) on the Row itself, which automatically adds space between all children.
Interview question
What is the primary purpose of the `Modifier` parameter in Jetpack Compose?
- a.To define the child composables that appear inside a layout.
- b.To configure a composable's size, spacing, appearance, and behavior.Correct
- c.To apply global theme styles, like colors and fonts, to a composable.
- d.To manage a composable's internal state and trigger recomposition.
Why? this is the answer
A Modifier is the standard way to configure a composable's size, layout, appearance, and behavior. While it can affect appearance (distractor D), its role is much broader, and global theme styles are typically handled by `MaterialTheme`.
Just read this? Test yourself on what you have been reading.
Read the original → developer.android.com
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on android — each one lists the topics its interview covers.
See open roles