Search in sources :

Example 41 with ViewAnimation

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

the class WoWoRotationAnimationActivity method setAnimation.

private void setAnimation(View view, float pivotX, float pivotY) {
    ViewAnimation animation = new ViewAnimation(view);
    animation.addPageAnimaition(new WoWoRotationAnimation(0, 0f, 1f, pivotX, pivotY, 0, 0, 180, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoRotationAnimation(1, 0f, 1f, pivotX, pivotY, 0, 60, 180, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoRotationAnimation(2, 0f, 1f, pivotX, pivotY, -45, 60, 180, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoRotationAnimation(3, 0f, 1f, pivotX, pivotY, 0, 0, 0, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoRotationAnimation(com.nightonke.wowoviewpager.WoWoRotationAnimation)

Example 42 with ViewAnimation

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

Example 43 with ViewAnimation

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

Example 44 with ViewAnimation

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

the class WoWoStateListColorAnimationActivity method setAnimation.

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

Example 45 with ViewAnimation

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

the class WoWoTextViewTextSizeAnimationActivity 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_textview_textsize_animation);
    init();
    wowo = (WoWoViewPager) findViewById(R.id.wowo_viewpager);
    adapter = new WoWoViewPagerAdapter(getSupportFragmentManager());
    adapter.setFragmentsNumber(3);
    adapter.setColorRes(R.color.white);
    wowo.setAdapter(adapter);
    setPageTV(wowo);
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.test));
    animation.addPageAnimaition(new WoWoTextViewSizeAnimation(0, 0f, 1f, 50, 20, easeType, useSameEaseTypeBack));
    animation.addPageAnimaition(new WoWoTextViewSizeAnimation(1, 0f, 1f, 20, 60, easeType, useSameEaseTypeBack));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoViewPagerAdapter(com.nightonke.wowoviewpager.WoWoViewPagerAdapter) WoWoTextViewSizeAnimation(com.nightonke.wowoviewpager.WoWoTextViewSizeAnimation)

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