Skip to content

Instantly share code, notes, and snippets.

@sagar-viradiya
Last active October 31, 2018 05:08
Show Gist options
  • Save sagar-viradiya/ae4062b9aa44e569b73dbd503f4b7bc7 to your computer and use it in GitHub Desktop.
Save sagar-viradiya/ae4062b9aa44e569b73dbd503f4b7bc7 to your computer and use it in GitHub Desktop.
Usage of SpringAnimation extension function
val springAnimation = SpringAnimation(view, DynamicAnimation.TRANSLATION_X)
.withSpringForceProperties {
finalPosition = 0f
stiffness = SpringForce.STIFFNESS_MEDIUM
dampingRatio = SpringForce.DAMPING_RATIO_HIGH_BOUNCY
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment