Android viewpager animation
问题 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? 回答1: 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