Jetpack Compose for Beginners
3 min readOct 22, 2023
If you are an android developer and want to start jetpack compose then this article will help you to built ui using jetpack compose.
What are composable functions?
A composable function is a regular function marked with @Composable
, which can call other composable functions. A function is all you need to create a new UI component. The annotation tells Compose to add special support to the function for updating and maintaining your UI over time. Compose lets you structure your code into small chunks. Composable functions are often referred to as "composables" for short.
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
text = "Hello $name!",
modifier = modifier
)
}
XML vs Jetpack Compose
How Jetpack Compose arranges UI elements on the screen?
The three basic standard layout elements in Compose are Column
, Row
and Box
.