I would like to be informed when the animation ends after this function call:
viewPager.setCurrentItem(2, true);
Does anyone know how to accomplish this?
I would like to be informed when the animation ends after this function call:
viewPager.setCurrentItem(2, true);
Does anyone know how to accomplish this?
You can use a OnPageChangeListener..
When a new page is selected, onPageSelected() gets called.
I have come across the same issue. the following is my conclusion:
When the page is actually changed onPageSelected will be called. But it's called before the animation.
When the animation stopped , onPageScrollStateChanged will be called with state SCROLL_STATE_IDLE.
So you have to combine this two function calls to get your function called.
Good Luck.