I have a tabbed ViewPager which lets the user jump to the corresponding page depending on which tab they press. The problem is that you see the view pager scroll really quickly to the selected page, meaning you get small glimpses of each its scrolls through. Is there a way to stop this and jump instantly without seeing other pages.
Asked
Active
Viewed 247 times
0
-
2Did u try viewPager.setCurrentItem(itemPosition,true); Also you can check [this](http://stackoverflow.com/questions/10812009/change-viewpager-animation-duration-when-sliding-programmatically) – LvN Aug 04 '16 at 08:42
-
Have a look here: https://developer.android.com/training/animation/screen-slide.html It show the use of ViewPager and ViewPagerTransformer to customize the transitions. – Rene M. Aug 04 '16 at 08:43
1 Answers
2
Call setCurrentItem(itemPosition, false) on your ViewPager instance. As per the documentation the second parameter is smoothScroll effect which causes the glimpses of the other fragments.

Alexi V.
- 143
- 1
- 2
- 10