Search in sources :

Example 11 with ViewAnimation

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

the class AppIntroExampleActivity method setNightonkeAnimation.

private void setNightonkeAnimation() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.nightonke));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.nightonke).getTranslationX(), findViewById(R.id.nightonke).getTranslationY(), -screenW, findViewById(R.id.nightonke).getTranslationY(), EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 12 with ViewAnimation

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

the class AppIntroExampleActivity method setWoWoAnimation.

private void setWoWoAnimation() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.wowo));
    animation.addPageAnimaition(new WoWoRotationAnimation(0, 0, 0, -20, findViewById(R.id.wowo).getPivotY(), 0, 0, -15, EaseType.EaseInBack, false));
    animation.addPageAnimaition(new WoWoRotationAnimation(0, 0, 1, -20, findViewById(R.id.wowo).getPivotY(), 0, 0, -150, EaseType.EaseInBack, false));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.wowo).getTranslationX(), findViewById(R.id.wowo).getTranslationY(), -screenW / 3, findViewById(R.id.wowo).getTranslationY(), EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoRotationAnimation(com.nightonke.wowoviewpager.WoWoRotationAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 13 with ViewAnimation

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

the class WoWoPathAnimationActivity method setPath.

private void setPath() {
    WoWoPathView pathView = (WoWoPathView) findViewById(R.id.pathview);
    ViewGroup.LayoutParams layoutParams = pathView.getLayoutParams();
    layoutParams.height = screenH;
    // set the pathView a little wider,
    // then the airplane can hide
    layoutParams.width = screenW + 200;
    pathView.setLayoutParams(layoutParams);
    // use this to adjust the path
    int xoff = -300;
    int yoff = screenH - 616 - 300;
    float xScale = 1.5f;
    float yScale = 1;
    Path path = new Path();
    path.moveTo(xScale * (565 + xoff), screenH + yoff);
    path.cubicTo(xScale * (509 + xoff), yScale * (385 + yoff), xScale * (144 + xoff), yScale * (272 + yoff), xScale * (394 + xoff), yScale * (144 + yoff));
    path.cubicTo(xScale * (477 + xoff), yScale * (99 + yoff), xScale * (596 + xoff), yScale * (91 + yoff), xScale * (697 + xoff), yScale * (128 + yoff));
    path.cubicTo(xScale * (850 + xoff), yScale * (189 + yoff), xScale * (803 + xoff), yScale * (324 + yoff), xScale * (66 + xoff), yScale * (307 + yoff));
    // set the path to pathView
    pathView.setPath(path);
    ViewAnimation animation = new ViewAnimation(pathView);
    animation.addPageAnimaition(new WoWoPathAnimation(0, 0f, 1f, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : Path(android.graphics.Path) WoWoPathView(com.nightonke.wowoviewpager.WoWoPathView) ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoPathAnimation(com.nightonke.wowoviewpager.WoWoPathAnimation) ViewGroup(android.view.ViewGroup)

Example 14 with ViewAnimation

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

the class WoWoTextViewColorAnimationActivity method setAnimation.

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

Example 15 with ViewAnimation

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

the class CVExampleActivity method setLeeCoMore.

private void setLeeCoMore() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.leeco_more));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0.2f, 1, screenW, findViewById(R.id.leeco_more).getTranslationY(), -screenW, 0, EaseType.EaseOutBack, false));
    animation.addPageAnimaition(new WoWoTranslationAnimation(1, 0, 1, 0, findViewById(R.id.leeco_more).getTranslationY(), -screenW, 0, EaseType.EaseOutBack, 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