I\'m implementing an endless listview by loading more items to the arraylist in the onScrollStateChanged(...) method. If I\'m implementing this scheme for fetching more than 1 m
I couldn't find an exact number mentioned in the docs. However, the return types of all Adapter#getCount() (look at the subclasses) are ints.
Therefore, we can strongly suspect you can add up to Integer.MAX_VALUE
items into an adapter, which is 231-1 (over 2 billions). Adapters use Lists
and Maps
to store the data internally, which have the same limit.
So you should not be worried about the limitations of the adapter rather than using too much memory. I suggest you to load 10-100 elements into the adapter and simply add more items as soon as the user reaches the bottom of the listview.