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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations