thest1 / LazyList

Lazy load of images in Android
http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview/3068012#3068012
MIT License
1.2k stars 497 forks source link

Application get slow/hang when change your code #43

Closed AkshayGangurde closed 9 years ago

AkshayGangurde commented 9 years ago

Hi, Thanks for your code. I needed Lazy Loader to load image from Internal Storage. So I change your code as per my need, My list is in TabHost. At first it works fine, But when I switch from one tab to another application gets slow and may times get Hang. Why so?

In your getBitmap() I changed code to get Image from Internal Storage.

thest1 commented 9 years ago

Probably you create multiple ImageLoader instances

AkshayGangurde commented 9 years ago

Oh,,!! Right. I created multiple instances of ImageLoader. Changed to single instance and now its working fabulous. Thank you so much, for quick response.

AkshayGangurde commented 9 years ago

Hello, I'm having one issue.. When I scroll My custom ListView Up and down, Images are setting random manner to imageview, what to do? and if any imageview not having image then it also get assign with different, is it a memory cache problem???

AkshayGangurde commented 9 years ago

Hi Mr. Fedor, You coded in MemoryCache.java " private long limit=1000000;//max memory in bytes" But Device to Device Size get vary then how to manage it runtime??

thest1 commented 9 years ago

Please take a look carefully. Memory cache uses 25% of available heap size. So it depends on device capabilities.