Skip to content

Instantly share code, notes, and snippets.

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