Search in sources :

Example 26 with ViewAnimation

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

the class AppIntroExampleActivity method setMusicStand.

private void setMusicStand() {
    ImageView musicStand = (ImageView) findViewById(R.id.music_stand);
    ViewGroup.LayoutParams layoutParams = musicStand.getLayoutParams();
    layoutParams.height = (screenH > 1184 ? 1184 : screenH);
    layoutParams.width = layoutParams.height * 750 / 1184;
    musicStand.setLayoutParams(layoutParams);
    ViewAnimation animation = new ViewAnimation(musicStand);
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 0.8f, screenW, musicStand.getTranslationY(), -screenW, musicStand.getTranslationY(), EaseType.Linear, false));
    animation.addPageAnimaition(new WoWoTranslationAnimation(1, 0, 0.5f, 0, 0, 0, screenH, EaseType.Linear, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) ViewGroup(android.view.ViewGroup) ImageView(android.widget.ImageView) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 27 with ViewAnimation

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

the class AppIntroExampleActivity method setViewPagerAnimation.

private void setViewPagerAnimation() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.viewpager));
    animation.addPageAnimaition(new WoWoRotationAnimation(0, 0, 0, -20, findViewById(R.id.viewpager).getPivotY(), 0, 0, 15, EaseType.EaseInBack, false));
    animation.addPageAnimaition(new WoWoRotationAnimation(0, 0, 1, -20, findViewById(R.id.viewpager).getPivotY(), 0, 0, 150, EaseType.EaseInBack, false));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.viewpager).getTranslationX(), findViewById(R.id.viewpager).getTranslationY(), -screenW / 3, findViewById(R.id.viewpager).getTranslationY(), EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoRotationAnimation(com.nightonke.wowoviewpager.WoWoRotationAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 28 with ViewAnimation

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

the class AppIntroExampleActivity method setNightonkeCloud.

private void setNightonkeCloud() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.nightonke_cloud));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 0, screenW, 0, 0, 0, EaseType.EaseOutBack, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(2, 0, 1, screenW, 0, -screenW, 0, EaseType.EaseOutBack, true));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 29 with ViewAnimation

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

the class AppIntroExampleActivity method setMusicNotes.

private void setMusicNotes() {
    ImageView musicNotes = (ImageView) findViewById(R.id.music_notes);
    ViewGroup.LayoutParams layoutParams = musicNotes.getLayoutParams();
    layoutParams.height = (screenH > 1184 ? 1184 : screenH);
    layoutParams.width = layoutParams.height * 750 / 1184;
    musicNotes.setLayoutParams(layoutParams);
    ViewAnimation animation = new ViewAnimation(musicNotes);
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 0, screenW, musicNotes.getTranslationY(), 0, 0, EaseType.Linear, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0.2f, 1, screenW, musicNotes.getTranslationY(), -screenW, musicNotes.getTranslationY(), EaseType.EaseOutBack, true));
    animation.addPageAnimaition(new WoWoTranslationAnimation(1, 0, 0.5f, 0, 0, 0, screenH, EaseType.Linear, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) ViewGroup(android.view.ViewGroup) ImageView(android.widget.ImageView) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

Example 30 with ViewAnimation

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

the class AppIntroExampleActivity method setPresentsAnimation.

private void setPresentsAnimation() {
    ViewAnimation animation = new ViewAnimation(findViewById(R.id.presents));
    animation.addPageAnimaition(new WoWoTranslationAnimation(0, 0, 1, findViewById(R.id.presents).getTranslationX(), findViewById(R.id.presents).getTranslationY(), -screenW, findViewById(R.id.presents).getTranslationY(), EaseType.EaseInBack, false));
    wowo.addAnimation(animation);
}
Also used : ViewAnimation(com.nightonke.wowoviewpager.ViewAnimation) WoWoTranslationAnimation(com.nightonke.wowoviewpager.WoWoTranslationAnimation)

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