Search in sources :

Example 1 with WoWoScaleAnimation

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

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

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

the class CVExampleActivity method setLogo.

private void setLogo() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.cv_logo));
    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 WoWoScaleAnimation(0, 0, 1, 0.5f, 0.5f, EaseType.EaseOutBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoScaleAnimation(com.nightonke.wowoviewpager.WoWoScaleAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 4 with WoWoScaleAnimation

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

the class WoWoScaleAnimationActivity 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_scale_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 WoWoScaleAnimation(0, 0f, 1f, 0.5f, 0.5f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoScaleAnimation(1, 0f, 1f, 4f, 4f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoScaleAnimation(2, 0f, 0.5f, 4f, 4f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoScaleAnimation(2, 0.5f, 1f, 0.5f, 0.5f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoScaleAnimation(3, 0f, 0.5f, 2f, 1f, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoScaleAnimation(3, 0.5f, 1f, 1f, 2f, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter) WoWoScaleAnimation(com.nightonke.wowoviewpager.WoWoScaleAnimation)

Aggregations

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