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