loopj / android-smart-image-view

Android ImageView replacement which allows image loading from URLs or contact address book, with caching
http://loopj.com/android-smart-image-view/
1.29k stars 502 forks source link

Loaded Images Mix Up While Scrolling In List View Adapter #45

Open pgpierremb2 opened 10 years ago

pgpierremb2 commented 10 years ago

Why is android Smart Image View mixing images on scroll view before all images are loaded?

jomivega commented 10 years ago

What do you mean by "mixing"?

EpicDraws commented 10 years ago

I am seeing something similar here. I load a 3x3 grid of images from a web location. What I observe is that the images load very quickly, then flash and some of them move around the grid. I have looked to debug my code and don't see anything sticking out. It may be the same issue pgpierremb2 is seeing above.

pgpierremb2 commented 10 years ago

@EpicDraws Back here, i tried from Universal Image Loader, Android Query, & Ooh no, they behaved the same way, & am just like, what the f**! So i landed on this url http://androidexample.com/Download_Images_From_Web_And_Lazy_Load_In_ListView_-_Android_Example/index.php & it seems to have helped me. Just implement the ImageLoader.java, FileCache.java, MemoryCache.java & Utils.java. Just copy & paste, maybe in a new package in your android project, to ensure cleaness of code.

Then in this part of code in ImageLoader.java put your required image size to avoid blurry images. -> // Set width/height of recreated image final int REQUIRED_SIZE=85;

Although i find a funny error sometimes, when the image becomes like a shocked television image where images becomes bzzz with rgbs..., hope you get the idea but later (1 sec) becomes alright. Picasso seems to be alright, but takes long to load image, & doesn't cache, i just don't know why, maybe it wasn't designed for lower versions of android, 2.2, 2.2.3, ..., just a guess.

Smart image view seems not to understand recycling of views well, from where the error emerges. As i faced this problem, i just wondered why the android team left this part, its when you feel like you want to beat up the designer of list view adapter, yet at the same time you remember adapters are really beautiful. But the image loading part, & the mixure (shuffle) of images, they should have done something about it.

But smart image view is excellent on one instance of an activity, no adapters.

pgpierremb2 commented 10 years ago

@jomivega i meant shuffling. Sorry for my English.

pgpierremb2 commented 10 years ago

@EpicDraws hope this will help you, man with the gun.! No offense.