Complete the code to display a simple text in Compose.
Text(text = [1])The Text composable requires a string argument for the text parameter. It must be a string literal in quotes.
Complete the code to create a Column layout in Compose.
Column(modifier = Modifier.[1]()) { Text("Item 1") Text("Item 2") }
fillMaxWidth() makes the Column fill the available width, helping layout the items vertically.
Fix the error in the code to make the Button clickable.
Button(onClick = [1]) { Text("Click me") }
The onClick parameter expects a lambda function. Using { println("Clicked") } defines the action when the button is clicked.
Fill both blanks to create a Box with padding and background color.
Box(modifier = Modifier.[1](16.dp).[2](Color.Blue)) { Text("Box content") }
padding(16.dp) adds space inside the Box edges, and background(Color.Blue) colors the Box background blue.
Fill all three blanks to create a LazyColumn with items and a modifier.
LazyColumn(modifier = Modifier.[1](), contentPadding = PaddingValues([3])) { items([2]) { item -> Text(text = item) } }
fillMaxSize() makes the list fill the screen. items(listOf(...)) provides the data to show. PaddingValues(16.dp) adds padding around the list content.