Search in sources :

Example 1 with WoWoShapeColorAnimation

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

the class AppIntroExampleActivity method setCircleAnimation.

private void setCircleAnimation() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.circle));
    animation.addPageAnimaition(new WoWoShapeColorAnimation(0, 0, 1, ContextCompat.getColor(this, R.color.gray), ContextCompat.getColor(this, R.color.light_blue), ColorChangeType.RGB, EaseType.Linear, true));
    animation.addPageAnimaition(new WoWoScaleAnimation(0, 0, 1, circleR * 2 / findViewById(R.id.circle).getWidth(), circleR * 2 / findViewById(R.id.circle).getHeight(), EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoShapeColorAnimation(com.nightonke.wowoviewpager.WoWoShapeColorAnimation) WoWoScaleAnimation(com.nightonke.wowoviewpager.WoWoScaleAnimation)

Example 2 with WoWoShapeColorAnimation

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

the class CVExampleActivity method setCircle.

private void setCircle() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.circle));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.cv_logo).getTranslationX(), findViewById(R.id.cv_logo).getTranslationY(), -screenW / 2 + 150, -screenH / 2 + 200, EaseType.EaseOutBack, false));
    animation.addPageAnimaition(new WoWoShapeColorAnimation(1, 0, 1, ContextCompat.getColor(this, R.color.my_pink), ContextCompat.getColor(this, R.color.light_blue), ColorChangeType.RGB, EaseType.Linear, true));
    animation.addPageAnimaition(new WoWoScaleAnimation(1, 0, 1, circleR * 2 / findViewById(R.id.circle).getWidth(), circleR * 2 / findViewById(R.id.circle).getHeight(), EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoShapeColorAnimation(com.nightonke.wowoviewpager.WoWoShapeColorAnimation) WoWoScaleAnimation(com.nightonke.wowoviewpager.WoWoScaleAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 3 with WoWoShapeColorAnimation

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

the class WoWoShapeColorAnimationActivity method setAnimation.

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

Aggregations

ViewAnimation (com.nightonke.wowoviewpager.ViewAnimation)3 WoWoShapeColorAnimation (com.nightonke.wowoviewpager.WoWoShapeColorAnimation)3 WoWoScaleAnimation (com.nightonke.wowoviewpager.WoWoScaleAnimation)2 WoWoTranslationAnimation (com.nightonke.wowoviewpager.WoWoTranslationAnimation)1