AndroidAnimationsActions
AndroidAnimationsActions copied to clipboard
Sequence method's parameter is too long
The method can be hard to read when the sequence is very long. Maybe the API can be changed to Builder pattern, something like
play().sequence().fadeOut().fadeIn(2).on(view)
Actually, I like your idea. Although I'm thinking that saving sequences to the separate variable is better choice. Imagine such code: play().sequence().parallel().sequnce().fadeOut().sequnce().fadeIn(2).on(view)
With builder this animation will be harder to read, I think.
You can see Android: https://github.com/geftimov/android-player iOS: https://github.com/jhurray/JHChainableAnimations & https://github.com/Draveness/DKChainableAnimationKit both use a Builder pattern