1

I have an "infinite" recyclerview that every time the user scrolls to the bottom it loads more data.

I start with 5 items, and if i keep scrolling down i can have thousands of Objects added to the adapter's ArrayList.

What is the preferred way to manage this? Cause i assume that having an array of this size is not ideal!

TareK Khoury
  • 12,721
  • 16
  • 55
  • 78
  • If you want to still display all the items that were loaded, this is the way to do it. If you want to do paging, you won't allow the user to scroll back up. If your concern is about the size of the RecyclerView, you should read about how it works, it's made to handle a large number of items, it doesn't keep all of them in memory at the same time. – pedrotorres Nov 30 '15 at 16:26
  • 1
    This could be relevant for you: http://stackoverflow.com/questions/22296095/android-endless-list-memory-management – rciovati Dec 01 '15 at 20:06

0 Answers0