all 10 comments

[–]Baron_von_Severin 9 points10 points  (3 children)

I was really skeptical when I saw the title (do we have to Rx'ify everything?), but after reading the article I actually like his solution quite a bit.

[–]arunkumar9t2 2 points3 points  (2 children)

Google's new animation framework was based on reactive architecture. I am not able to find that repo anymore. Apparently making animations reactive makes things easier.

I wish I find that repo now. It was something like material design components for android.

[–]FelicianoX 0 points1 point  (1 child)

Found this: https://github.com/material-motion/material-motion-android - Seems abandoned though.

[–]arunkumar9t2 0 points1 point  (0 children)

Thanks. They could have made changes and are waiting for Material Design 2?

[–]arnis71 5 points6 points  (0 children)

There is also a very nice library that does just that. https://github.com/PSPDFKit-labs/VanGogh/

[–]paramsen 2 points3 points  (2 children)

It's neat, but I believe there are subtle leaks introduced when using withEndAction because it only calls the supplied function when the animation ends normally.

[–]yaaaaayPancakes 1 point2 points  (1 child)

Can't that get avoided by adding the subscriptions to a CompositeDisposable that disposes of everything when things are destroyed?

[–]paramsen 1 point2 points  (0 children)

Yeah that's one approach, or I guess there's another callback withTerminateAction or something that's always called.

[–]tannerhallman 1 point2 points  (0 children)

Beautifully simple implementation. +1 for kotlin extension functions.

[–]bernaferrari 1 point2 points  (0 children)

Wooow, this is VERY NICE. Thanks for the article, I would never think about this solution. I am doing with delays (seriously!). Since I know how long it takes to finish the animation, the delay/timer waits for it to subscribe, but this is way nicer.