Skip to content

Instantly share code, notes, and snippets.

@droibit
Created July 13, 2015 04:53
Show Gist options
  • Save droibit/d4509002e17c0cfd8119 to your computer and use it in GitHub Desktop.
Save droibit/d4509002e17c0cfd8119 to your computer and use it in GitHub Desktop.
Clippin extension for Kotlin
/**
* Shortcut of the [Clippin.animate().target(view)].
*/
public fun View.clip(): ClippingAnimator = Clippin.animate().target(this)
// call example
val view = ... // create view
view.clip().circleCenter(Clippin.CENTER_LEFT_BOTTOM)
.duration(600)
.show {
Toast.makeText(context, "Show", Toast.LENGTH_SHORT).show()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment