Skip to content

Instantly share code, notes, and snippets.

@pauloaapereira
Created March 16, 2021 19:01
Show Gist options
  • Save pauloaapereira/8e7797ed5e5054d2516a36eaffb28349 to your computer and use it in GitHub Desktop.
Save pauloaapereira/8e7797ed5e5054d2516a36eaffb28349 to your computer and use it in GitHub Desktop.
Jetpack Compose - Pendulum Effect - 3
val x by infiniteTransition.animateFloat(
initialValue = start.value,
targetValue = end.value,
animationSpec = infiniteRepeatable(
animation = tween(swingDuration, easing = LinearEasing),
repeatMode = RepeatMode.Reverse
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment