lucasr / smoothie

[DEPRECATED] Easy async loading for Android's ListView/GridView
985 stars 163 forks source link

Random elements re-appearing when flinging #27

Closed zsoltk closed 9 years ago

zsoltk commented 10 years ago

Hello lucasr,

I like your project very much, and I'd love to see it hit production! I don't know if the following is a bug or I'm doing something wrong, please advise.

I use list items with some text and an imageview, data coming from db. If I scroll slowly, everything seems to work fine. However, when I fling the list, and there's no chance of preloading items fast enough, instead of seeing the default (empty) placeholder view, I see random, already left behind elements re-appearing until the loading finishes and correct data and images replace them.

Could you please help me track down the source of this problem? It looks really annoying. Is there any place where the placeholder view gets cached? Where exactly does it get displayed until loading finishes?

Thanks & regards, zsoltk

zsoltk commented 10 years ago

Oh, now I see that in both your samples you are manually resetting the holder in the Adapter class in the getView method. I guess otherwise the holder is recycled as it's cached in the view's tag.

theoklink commented 10 years ago

I have implemented smoothie in my Playlist Manager app where i display albumart. I have found that fastscrollenabled interferes so ensured that it is removed from layouts etc. I still have the occasional albumart "miss" when fast scrolling and on the first load of a screen. I have been unable to figure out why this happens but found that when no albumart is found, providing a default icon improves the behaviour. Like you I would love to see this library reach maturity. Regards T