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

Add additional handling for low-memory devices #28

Open omniuni opened 11 years ago

omniuni commented 11 years ago

When I was using this on my Droid 1, I ran in to out of memory errors. Although it's not perfect, this does improve the situation dramatically. If Android's memory manager reports that the device is low on memory, it uses a high inSample to decrease memory use when loading bitmaps from a downloaded stream. Additionally, in the OnCompleteHandler, it now will catch an OutOfMemoryError instead of simply crashing.