What is the practical effect of viewPager.setOffscreenPageLimit(3);?

前端 未结 2 373
春和景丽
春和景丽 2020-12-17 16:42

I have three pages and have set Page Limit to 3.

  mViewPager.setOffscreenPageLimit(3);

What is the practical effect of this? Does it impro

2条回答
  •  清酒与你
    2020-12-17 17:13

    I have found that by dynamically change the number, not only can you optimize the paging animations and interactions by making the number large, you can also optimize the in page animations and interactions smooth by making the number small. (provided that you know the page length that you want)

    (Just want to share this since it's relavent. Pretty sure the OP is not looking for an answer any more. :) )

提交回复
热议问题