Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save Kiolk/72300080655df119674d3f7768194af9 to your computer and use it in GitHub Desktop.
Animation Preview
@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