library / org.akop.kotx.ext.view / android.view.View / animate

animate

fun View.animate(@AnimRes animationResId: Int): Unit

Loads and begins animation with specified resource id.

fun View.animate(@AnimRes animationResId: Int, butFirst: Animation.(View) -> Unit = {}, andThen: Animation.(View) -> Unit = {}, onRepeat: Animation.(View) -> Unit = {}): Unit

Loads and begins animation with specified resource id, optionally executing a block specified by butFirst prior to animation, andThen following the animation, and onRepeat upon repeat.

fun View.animate(animation: Animation, butFirst: Animation.(View) -> Unit = {}, andThen: Animation.(View) -> Unit = {}, onRepeat: Animation.(View) -> Unit = {}): Unit

Begins animation, optionally executing a block specified by butFirst prior to animation, andThen following the animation, and onRepeat upon repeat.

Don't set an Animation.AnimationListener prior to calling this method, because it will be reset.