/** * Inject your custom animation into PageTransformer, you can know more details in {@link * com.daimajia.slider.library.Animations.BaseAnimationInterface}, and you can see a example in * {@link com.daimajia.slider.library.Animations.DescriptionAnimation} * * @param animation */ public void setCustomAnimation(BaseAnimationInterface animation) { mCustomAnimation = animation; if (mViewPagerTransformer != null) { mViewPagerTransformer.setCustomAnimationInterface(mCustomAnimation); } }
/** * set ViewPager transformer. * * @param reverseDrawingOrder * @param transformer */ public void setPagerTransformer(boolean reverseDrawingOrder, BaseTransformer transformer) { mViewPagerTransformer = transformer; mViewPagerTransformer.setCustomAnimationInterface(mCustomAnimation); mViewPager.setPageTransformer(reverseDrawingOrder, mViewPagerTransformer); }