ListView very slow when scrolling (using ViewHolder/recycling)

后端 未结 10 513

I\'m back at trying out some Android dev again. I have an \"old\" HTC Hero phone lying around, so I booted that one up, did some updates and are now up n running again with Ecli

10条回答
  •  暖寄归人
    2021-02-02 16:59

    After optimizing my getView() method to use a holder and to reuse convertView if it's not null, my listview was still pretty laggy. Then, I've tried

    listView.setScrollingCacheEnabled(false);
    

    and it solved it at once.

    Hope this helps someone.

提交回复
热议问题