RecyclerView: Async image-loading

前端 未结 7 863
被撕碎了的回忆
被撕碎了的回忆 2020-12-28 15:58

Im using RecyclerView to display a list containing an imageView. To make the UI more fluently, I load 58dp thumbnails saved on sd card into these i

7条回答
  •  滥情空心
    2020-12-28 16:38

    I would add to the good practice:

    In the good practice you set your ImageView to display nothing at the beginning of bindViewHolder(VH holder, int position) using setDrawable(null) or similar.

    not to display nothing, but to display a loader image so to give the user a feedback that theres some processing going on in that view and in a little while it will see the results. Seeing just a blank view is not good practice, you need to give feedback to the user.

提交回复
热议问题