Skip to content

Instantly share code, notes, and snippets.

@nikit19
Last active October 24, 2021 13:09
Show Gist options
  • Save nikit19/7594b0593df16f97533bda001c8275cb to your computer and use it in GitHub Desktop.
Save nikit19/7594b0593df16f97533bda001c8275cb to your computer and use it in GitHub Desktop.
ScalingLazyColumn(
modifier = Modifier.fillMaxSize(),
contentPadding = PaddingValues(
top = 10.dp,
start = 10.dp,
end = 10.dp,
bottom = 40.dp
),
horizontalAlignment = Alignment.CenterHorizontally,
state = scalingLazyListState
) {
items(10) { index ->
Chip(
modifier = Modifier
.width(140.dp)
.padding(top = 10.dp),
icon = {
Icon(
painter = painterResource(id = android.R.drawable.btn_star_big_on),
contentDescription = "Star",
modifier = Modifier
.size(24.dp)
.wrapContentSize(align = Alignment.Center),
)
},
label = {
Text(
modifier = Modifier.fillMaxWidth(),
color = MaterialTheme.colors.onPrimary,
text = "Item ${index + 1}"
)
},
onClick = {}
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment