Search in sources :

Example 16 with ViewAnimation

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

the class CVExampleActivity method setProjects.

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

Example 17 with ViewAnimation

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

the class CVExampleActivity method setMailIcon.

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

Example 18 with ViewAnimation

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

the class WoWoAlphaAnimationActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_wowo_alpha_animation);
    init();
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(5);
    adapter.setColorRes(R.color.white);
    wowo.setAdapter(adapter);
    setPageTV(wowo);
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.test));
    animation.addPageAnimaition(new WoWoAlphaAnimation(0, 0f, 1f, 1, 0.5f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(1, 0f, 1f, 0.5f, 1f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(2, 0f, 0.5f, 1, 0f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(2, 0.5f, 1f, 0, 1f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(3, 0f, 0.5f, 1, 0.3f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoAlphaAnimation(3, 0.5f, 1f, 0.3f, 1f, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter) WoWoAlphaAnimation(com.nightonke.wowoviewpager.WoWoAlphaAnimation)

Example 19 with ViewAnimation

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

the class CVExampleActivity method setPath.

private void setPath() {
    WoWoPathView pathView = (WoWoPathView) findViewById(R.id.pathview);
    ViewGroup.LayoutParams layoutParams = pathView.getLayoutParams();
    layoutParams.height = screenH;
    layoutParams.width = screenW;
    pathView.setLayoutParams(layoutParams);
    int xoff = 0;
    int yoff = screenH - 576 - 100;
    float xScale = 1f;
    float yScale = 1;
    Path path = new Path();
    path.moveTo(xScale * (screenW + xoff + 50), 167 + yoff);
    path.cubicTo(xScale * (654 + xoff), yScale * (492 + yoff), xScale * (336 + xoff), yScale * (583 + yoff), xScale * (-150 + xoff), yScale * (576 + yoff));
    pathView.setPath(path);
    ViewAnimation animation = new ViewAnimation(pathView);
    animation.addPageAnimaition(new WoWoPathAnimation(1, 0f, 1f, EaseType.Linear, true));
    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 20 with ViewAnimation

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

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