Skip to content
Ivan Škorić edited this page Mar 8, 2019 · 6 revisions

Welcome to the VanGogh library wiki page. This wiki contains necessary documentation for you to get started, as well as some more advanced things you might want to do and ones you're maybe not aware of. Also, the documentation will be expanded as the time goes on.

Introduction

VanGogh is a library that contains RxJava2 wrappers for handling animations on Android. The idea is to provide you with a lot of common animations you might want to use, as well as to give you the generic base to write your own animations in a simple yet powerful form.

Keep in mind that more and more animations will be added in the near future, but it doesn't prevent you from creating them on your own if you need something that's not implemented yet. Also, if you feel that some animation is very common yet not provided by the library, feel free to create an issue.

Why RxJava?

RxJava is a library for composing asynchronous and event-based programs by using observable sequences. When used with animations, it eliminates the nesting of animation event listeners and gives you nice APIs for composing animations and controlling animation logic.

Some knowledge of RxJava2 is needed in order to be able to use VanGogh. You can find more info here: https://github.com/ReactiveX/RxJava/wiki/How-To-Use-RxJava. There are a lot of resources for RxJava2 online as well.

API

Here's a really simple example of the API just to demonstrate the verbosity of the things you can do:

fadeIn(view1)
  .andThen(fadeIn(view2))
  .andThen(together(fadeOut(view3), fadeOut(view4)))
  .subscribe();

The animation that will execute needs no explanation, since the sample code is really verbose. This is just a tip of the iceberg. For further documentation see the rest of this wiki.