Search in sources :

Example 21 with ViewAnimation

use of com.nightonke.wowoviewpager.ViewAnimation 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)

Example 22 with ViewAnimation

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

the class AppIntroExampleActivity method setSun.

private void setSun() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.sun));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 0, screenW, -screenW, 0, 0, EaseType.Linear, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(2, 0, 1, screenW, -screenW, -screenW, screenW, EaseType.Linear, true));
    animation.addPageAnimaition(new WoWoRotationAnimation(2, 0, 1, findViewById(R.id.sun).getPivotX(), findViewById(R.id.sun).getPivotY(), 0, 0, 360 * 4, EaseType.EaseOutBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoRotationAnimation(com.nightonke.wowoviewpager.WoWoRotationAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 23 with ViewAnimation

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

the class AppIntroExampleActivity method setFree.

private void setFree() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.free));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 0, screenW, 0, 0, 0, EaseType.Linear, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(2, 0, 1, screenW, 0, -screenW, 0, EaseType.Linear, true));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 24 with ViewAnimation

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

the class AppIntroExampleActivity method setBlueStickAnimation.

private void setBlueStickAnimation() {
    ImageView blueStick = (ImageView) findViewById(R.id.blue_stick);
    ViewGroup.LayoutParams layoutParams = blueStick.getLayoutParams();
    layoutParams.height = screenH * 4 / 5;
    layoutParams.width = layoutParams.height * 466 / 1002;
    blueStick.setLayoutParams(layoutParams);
    ViewAnimation animation = new ViewAnimation(blueStick);
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.blue_stick).getTranslationX(), findViewById(R.id.blue_stick).getTranslationY(), blueStick.getTranslationX(), screenH, EaseType.Linear, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) ViewGroup(android.view.ViewGroup) ImageView(android.widget.ImageView) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 25 with ViewAnimation

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

the class AppIntroExampleActivity method setLittleCloud.

private void setLittleCloud() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.little_cloud));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 0, 0, -screenH / 2, 0, 0, EaseType.EaseOutBack, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(1, 0, 1, 0, -screenH / 2, 0, screenH / 2, EaseType.EaseOutBack, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(2, 0, 1, 0, 0, -screenW, 0, EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Aggregations

ViewAnimation (com.nightonke.wowoviewpager.ViewAnimation)46 WoWoTranslationAnimation (com.nightonke.wowoviewpager.WoWoTranslationAnimation)33 ViewGroup (android.view.ViewGroup)7 WoWoRotationAnimation (com.nightonke.wowoviewpager.WoWoRotationAnimation)6 ImageView (android.widget.ImageView)4 WoWoScaleAnimation (com.nightonke.wowoviewpager.WoWoScaleAnimation)4 WoWoViewPagerAdapter (com.nightonke.wowoviewpager.WoWoViewPagerAdapter)4 Path (android.graphics.Path)3 WoWoPathAnimation (com.nightonke.wowoviewpager.WoWoPathAnimation)3 WoWoPathView (com.nightonke.wowoviewpager.WoWoPathView)3 WoWoShapeColorAnimation (com.nightonke.wowoviewpager.WoWoShapeColorAnimation)3 WoWoAlphaAnimation (com.nightonke.wowoviewpager.WoWoAlphaAnimation)2 WoWoBackgroundColorAnimation (com.nightonke.wowoviewpager.WoWoBackgroundColorAnimation)2 WoWoTextViewSizeAnimation (com.nightonke.wowoviewpager.WoWoTextViewSizeAnimation)2 WoWoLayerListColorAnimation (com.nightonke.wowoviewpager.WoWoLayerListColorAnimation)1 WoWoStateListColorAnimation (com.nightonke.wowoviewpager.WoWoStateListColorAnimation)1 WoWoTextViewColorAnimation (com.nightonke.wowoviewpager.WoWoTextViewColorAnimation)1