Search in sources :

Example 1 with WoWoTextViewSizeAnimation

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

the class CVExampleActivity method setName.

private void setName() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.name));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.name).getTranslationX(), findViewById(R.id.name).getTranslationY(), -screenW / 2 + 150 + WoWoUtil.dp2px(105, this) + 20, -screenH / 2 + 200 - WoWoUtil.dp2px(70, this), EaseType.EaseOutBack, false));
    animation.addPageAnimaition(new WoWoTextViewSizeAnimation(0, 0, 1, 30f, 22f, EaseType.Linear, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoTextViewSizeAnimation(com.nightonke.wowoviewpager.WoWoTextViewSizeAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 2 with WoWoTextViewSizeAnimation

use of com.nightonke.wowoviewpager.WoWoTextViewSizeAnimation 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)2 WoWoTextViewSizeAnimation (com.nightonke.wowoviewpager.WoWoTextViewSizeAnimation)2 WoWoTranslationAnimation (com.nightonke.wowoviewpager.WoWoTranslationAnimation)1 WoWoViewPagerAdapter (com.nightonke.wowoviewpager.WoWoViewPagerAdapter)1