onPageSelected isn't triggered when calling setCurrentItem(0)

后端 未结 10 1769
梦如初夏
梦如初夏 2020-12-22 20:13

I have an Activity with a ViewPager which displays a bunch of pictures. When it starts the ViewPager\'s position is set based on what the user selected in a previous Activit

10条回答
  •  情深已故
    2020-12-22 20:27

    onPageSelected is not triggered for page which is opened first. For this case I manually perform all needed actions. Also, I suppose that call to onPageSelected(0) should work too.

提交回复
热议问题