RecyclerView laggy scrolling

后端 未结 13 734
闹比i
闹比i 2020-12-09 09:44

I am loading 400x200 images in RecyclerView, but scrolling is laggy on 2k devices. I am using Picasso for loading images from resource.

As you can see in the demo ima

13条回答
  •  有刺的猬
    2020-12-09 10:35

    I Believe that sometimes you may piss off when only trying some static images in drawable to display your recycler view. And it happens extremely lagging.

    Why? You may not get this issue when using some library to load an image from url (Picasso, Glide, ...), but what happens with the same image, the same size, and it's right in your drawable (not need to download at all). And after a while, I figure out, android did some trick to resize an image in drawable for us to get a proper image in different resolution devices. So my suggestion is to use drawable-nodpi to store your image in order for android not to interfere with our images.

提交回复
热议问题