Skip to content

Running the Animations

Ivan Škorić edited this page Oct 31, 2017 · 2 revisions

In order to run specified Animation you just subscribe to the AnimationCompletable wrapping that animation:

AnimationBuilder.forView(someView)
    .alpha(0.5f)
    .duration(300L)
    .interpolator(new LinearInterpolator())
    .buildCompletable()
    .subscribe();

This will execute the specified animation and call onCompleted() once it's finished, or call onError() if something goes wrong. You can handle those callbacks in subscriber you use for subscribing (if any). This is standard RxJava stuff, no need for further explanation.