Search in sources :

Example 1 with WoWoBackgroundColorAnimation

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

the class WoWoBackgroundColorAnimationActivity method setAnimation.

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

Example 2 with WoWoBackgroundColorAnimation

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

the class CVExampleActivity method setBase.

private void setBase() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.base));
    animation.addPageAnimaition(new WoWoBackgroundColorAnimation(0, 0, 1, ContextCompat.getColor(this, R.color.light_blue), ContextCompat.getColor(this, R.color.my_pink), ColorChangeType.RGB, EaseType.Linear, true));
    wowo.addAnimation(animation);
}
Also used : WoWoBackgroundColorAnimation(com.nightonke.wowoviewpager.WoWoBackgroundColorAnimation) ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation)

Aggregations

ViewAnimation (com.nightonke.wowoviewpager.ViewAnimation)2 WoWoBackgroundColorAnimation (com.nightonke.wowoviewpager.WoWoBackgroundColorAnimation)2