I have a viewpager and I have used a simple page transformer. The animation works on swiping the viewpager but it does not work when i call
mViewPager.setCurrentItem(position);
the page changes but without any animation. How do I apply the animation to the viewpager even when the page item is changed by clicking the next/previous button
there's a
smoothScrollparameter insetCurrentItemmethod if you check the documentationtry replacing
mViewPager.setCurrentItem(position);with
mViewPager.setCurrentItem(position, true);(i haven't checked if it is working, but it might work)