Android Endless list memory management

后端 未结 9 2226
温柔的废话
温柔的废话 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:09

    In Android the ListView is virtualized. Practically that means that there's no actual limit for number of elements inside it. You can put millions of rows inside the list, it'll only allocate memory for the currently visible ones (or a few more tops).

    Source

    Also check this article Performance Tips for Android’s ListView

提交回复
热议问题