Recycling views in custom array adapter: how exactly is it handled?

后端 未结 5 897
栀梦
栀梦 2020-12-15 11:15

I am having an unclear issue concerning the recycling of views in a getView method of a custom array adapter.

I understand that elements are reused, but how do I kn

5条回答
  •  难免孤独
    2020-12-15 12:00

    I would recommend that you use the View holder and convertview pattern to create your listView as it will be more efficient.Here is a good explanation of how it works with a re-use strategy. This will answer your question on how re-cycling works. If you want to refer to a code sample, I have it on GitHub.

    Hope this helps.

提交回复
热议问题