Loading network images in a RecyclerView #1616
Unanswered
Daniel-sims
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a screen where there's 8-9 items displayed at once, with an image associated with each item.
On slow networks if you enter the screen and scroll down at speed, occasionally the wrong images will be loaded into each item.
I'm using a load and a target to set the image drawable, I've added a call to
dispose()
before my call to load to dispose of the previous request and this seems to have fixed the bug.But there's also the listener interface which we can use which sets the image for us. When implementing this, the images got completely out of sync with where they are, so I'm not sure if this is a bug or if we're meant to use target for situations like this.
Note that this bug was also happening before we migrated from Picasso to Coil, so I don't think the wrong images being loaded is specifically a Coil issue as we weren't calling
cancelRequest
either.My questions;
Beta Was this translation helpful? Give feedback.
All reactions