Created
January 18, 2022 04:06
-
-
Save husaynhakeem/de726572f5dc8bb01d235cd344e3861b 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
class ListWidget : GlanceAppWidget() { | |
private val items = listOf("an item", "another item", /* more items */) | |
@Composable | |
override fun Content() { | |
LazyColumn( | |
modifier = GlanceModifier.padding(8.dp) | |
) { | |
items(items) { item -> | |
Text( | |
text = item, | |
modifier = GlanceModifier | |
.padding(vertical = 8.dp) | |
.clickable( | |
onClick = // some action | |
) | |
) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment