Skip to content

Instantly share code, notes, and snippets.

@husaynhakeem
Created January 18, 2022 04:06
Show Gist options
  • Save husaynhakeem/de726572f5dc8bb01d235cd344e3861b to your computer and use it in GitHub Desktop.
Save husaynhakeem/de726572f5dc8bb01d235cd344e3861b to your computer and use it in GitHub Desktop.
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