AndroidAnimationsActions icon indicating copy to clipboard operation
AndroidAnimationsActions copied to clipboard

Sequence method's parameter is too long

Open markzhai opened this issue 9 years ago • 2 comments

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)

markzhai avatar Sep 15 '15 11:09 markzhai

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.

dtx12 avatar Sep 15 '15 16:09 dtx12

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

markzhai avatar Sep 18 '15 12:09 markzhai