instantiate all items in view pager android

后端 未结 1 1723
花落未央
花落未央 2021-02-19 13:07

I have an activity with a view pager and three pages to display. When ever the activity loads, only the first two pages are instantiated i.e instantiateitem in the pageradapter

相关标签:
1条回答
  • 2021-02-19 13:42

    Try setOffScreenPageLimit(2). By default only one page to the left and to the right are instantiated. By setting to 2 it should instantiate your 3 pages.

    0 讨论(0)
提交回复
热议问题