Android Endless list memory management

后端 未结 9 2094
温柔的废话
温柔的废话 2021-02-05 07:42

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

9条回答
  •  星月不相逢
    2021-02-05 08:26

    I think you should just keep the current entries and the one just before or after them(maybe 100),put this data to a cache.

    When you scroll your listview,fetch more entries and update the cache as before(do not get 1 million at one time).

提交回复
热议问题