Skip to content

Instantly share code, notes, and snippets.

@Kiolk
Last active February 20, 2026 20:43
Show Gist options
  • Select an option

  • Save Kiolk/e29a2e8b3b412862128726539dcebee0 to your computer and use it in GitHub Desktop.

Select an option

Save Kiolk/e29a2e8b3b412862128726539dcebee0 to your computer and use it in GitHub Desktop.
BouncingProgressPreview
private class ProgressPreviewProvider : PreviewParameterProvider<Float> {
override val values = (0..100 step 10).map { it / 100f }.asSequence()
}
@Preview(showBackground = true, uiMode = UI_MODE_NIGHT_NO, name = "Light")
@Preview(showBackground = true, uiMode = UI_MODE_NIGHT_YES, name = "Dark")
@Composable
private fun BouncingProgressPreview(
@PreviewParameter(ProgressPreviewProvider::class) progress: Float,
) {
BouncingProgressTheme {
Box(
modifier = Modifier
.background(MaterialTheme.colorScheme.background)
.padding(horizontal = 24.dp, vertical = 12.dp)
) {
BouncingProgress(progress = progress)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment