What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter?

后端 未结 7 2045
傲寒
傲寒 2020-11-22 12:31

What is the difference between FragmentPagerAdapter and FragmentStatePagerAdapter?

About FragmentPagerAdapter Google\'s guide

相关标签:
7条回答
  • 2020-11-22 13:27

    FragmentStatePagerAdapter = To accommodate a large number of fragments in ViewPager. As this adapter destroys the fragment when it is not visible to the user and only savedInstanceState of the fragment is kept for further use. This way a low amount of memory is used and a better performance is delivered in case of dynamic fragments.

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