1

Or is it perfectly fine to increase the value returned as the user scrolls through the views?

In all examples for a PagerAdapter the value returned is the size of some Collection, thus a static value. The API also doesn't specify wether the value returned by getCount() is expected to remain static.

The question also applies for the getItemCount() method of RecyclerView.Adapter for ViewPager2.

user1785730
  • 3,150
  • 4
  • 27
  • 50

0 Answers0