How to avoid flickering while updating gridview?

前端 未结 9 2298
谎友^
谎友^ 2021-01-05 07:01

I have a gridview. Im displaying images from the array of 10 images. After 1 minute i\'m adding 5 more images. To update the gridview i\'m using the following code.

<
9条回答
  •  误落风尘
    2021-01-05 07:58

    Flickering occurs because the updating the UI is heavy.Please check weather you are doing cpu intensive functions like image cropping in the getview() of the adapter.The idea is to keep the getview() function simple and do the process intensive logic in separate threads.

提交回复
热议问题