Created
March 11, 2022 11:43
-
-
Save Mdhanif123/329fdc57c6293341940e7d694e478aac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun LazyColumnExample() { | |
val itemsList = (0..20).toList() | |
LazyColumn( | |
contentPadding = PaddingValues(10.dp), | |
verticalArrangement = Arrangement.spacedBy(10.dp) | |
) { | |
items(itemsList.size) { | |
Column( | |
modifier = Modifier | |
.fillMaxWidth() | |
.height(50.dp) | |
.background(MaterialTheme.colors.background) | |
.border(1.dp, MaterialTheme.colors.primary), | |
verticalArrangement = Arrangement.Center, | |
horizontalAlignment = Alignment.CenterHorizontally | |
) { | |
Text(text = "Item Number $it", color = MaterialTheme.colors.primary) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment