Search in sources :

Example 1 with WoWoLayerListColorAnimation

use of com.nightonke.wowoviewpager.WoWoLayerListColorAnimation in project WoWoViewPager by Nightonke.

the class WoWoLayerListColorAnimationActivity method setAnimation.

private void setAnimation(View view, ColorChangeType colorChangeType) {
    ViewAnimation animation = new ViewAnimation(view);
    animation.addPageAnimaition(new WoWoLayerListColorAnimation(0, 0f, 1f, new int[] { Color.parseColor("#000000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000") }, new int[] { Color.parseColor("#0000ff"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00") }, colorChangeType, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoLayerListColorAnimation(1, 0f, 1f, new int[] { Color.parseColor("#0000ff"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00") }, new int[] { Color.parseColor("#000000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000") }, colorChangeType, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoLayerListColorAnimation(2, 0f, 1f, new int[] { Color.parseColor("#000000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000") }, new int[] { Color.parseColor("#0000ff"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00") }, colorChangeType, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoLayerListColorAnimation(3, 0f, 1f, new int[] { Color.parseColor("#0000ff"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00") }, new int[] { Color.parseColor("#000000"), Color.parseColor("#ff0000"), Color.parseColor("#00ff00"), Color.parseColor("#00ff00"), Color.parseColor("#ff0000") }, colorChangeType, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoLayerListColorAnimation(com.nightonke.wowoviewpager.WoWoLayerListColorAnimation)

Aggregations

ViewAnimation (com.nightonke.wowoviewpager.ViewAnimation)1 WoWoLayerListColorAnimation (com.nightonke.wowoviewpager.WoWoLayerListColorAnimation)1