Android Pager Issue on Pause

前端 未结 3 1027
情深已故
情深已故 2021-01-05 18:19

I\'m building an application using Pager with the compatibility library. My application forceClose whenever I try to pause it (when I come back to my desktop for instance).<

相关标签:
3条回答
  • 2021-01-05 18:40

    Instead you can follow the work around here that I have posted earlier for an issue related to NPE while using Tab + Fragment + ViewPager + FragmentStatePagerAdapter

    I hope same solution will work for you

    0 讨论(0)
  • 2021-01-05 18:40

    try out mu answer here basically override the onSaveInstanceState, put atleast one value in the bundle. Do for all fragments

    0 讨论(0)
  • 2021-01-05 18:52

    I've stumbled upon the same problem while using ActionBarSherlock compatibility library. The workaround is that your adapter extends FragmentStatePagerAdapter instead of FragmentPagerAdapter.

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