Last active
February 20, 2026 20:43
-
-
Save Kiolk/e29a2e8b3b412862128726539dcebee0 to your computer and use it in GitHub Desktop.
BouncingProgressPreview
This file contains hidden or 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
| 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