Last active
February 20, 2026 20:44
-
-
Save Kiolk/72300080655df119674d3f7768194af9 to your computer and use it in GitHub Desktop.
Animation Preview
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
| @Preview(showBackground = true, name = "Animation") | |
| @Composable | |
| private fun BouncingProgressAnimationPreview() { | |
| var progress by remember { mutableIntStateOf(0) } | |
| LaunchedEffect(Unit) { | |
| while (true) { | |
| progress = 0 | |
| delay(600) | |
| progress = 60 | |
| delay(1200) | |
| progress = 80 | |
| delay(2000) | |
| } | |
| } | |
| BouncingProgressTheme { | |
| Box( | |
| modifier = Modifier | |
| .background(MaterialTheme.colorScheme.background) | |
| .padding(horizontal = 24.dp, vertical = 12.dp) | |
| ) { | |
| BouncingProgress(progress = progress / 100f) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment