Search in sources :

Example 6 with WoWoRotationAnimation

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

Aggregations

ViewAnimation (com.nightonke.wowoviewpager.ViewAnimation)6 WoWoRotationAnimation (com.nightonke.wowoviewpager.WoWoRotationAnimation)6 WoWoTranslationAnimation (com.nightonke.wowoviewpager.WoWoTranslationAnimation)5