-
-
Save skydoves/4af06616d4dd9416d3c076d7109f7f97 to your computer and use it in GitHub Desktop.
performance_example
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 ConcertPerformers( | |
scrollState: ScrollState, | |
venueName: String, | |
performers: PersistentList<String>, | |
modifier: Modifier = Modifier | |
) { | |
Column(modifier = modifier) { | |
Text( | |
modifier = Modifier.background(color = Color.LightGray), | |
text = "The following performers are performing at $venueName tonight:" | |
) | |
Column( | |
Modifier | |
.weight(1f) | |
.verticalScroll(scrollState) | |
) { | |
for (item in performers) { | |
PerformerItem(performer = item) | |
} | |
} | |
} | |
} | |
@Composable | |
fun PerformerItem(performer: String) { | |
Card( | |
modifier = Modifier | |
.padding(vertical = 10.dp) | |
.background( | |
color = Color.LightGray, | |
) | |
.wrapContentHeight() | |
.fillMaxWidth() | |
) { | |
Text( | |
modifier = Modifier.padding(10.dp), | |
text = performer | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment