Created
October 2, 2018 08:38
-
-
Save sagar-viradiya/d3bc734fad49d7f062ff6d5eeb411f52 to your computer and use it in GitHub Desktop.
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
inline fun <K: View> K.springAnimationOf(property: FloatPropertyCompat<K>, | |
func: SpringForce.() -> Unit): SpringAnimation { | |
val springAnimation = SpringAnimation(this, property) | |
val springForce = SpringForce() | |
springForce.func() | |
springAnimation.spring = springForce | |
return springAnimation | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment