A period of time to do a news project, the news list of pictures are network pictures, just start is a custom ImageView (and so in which added an asynchronous download and then set the background) although the network image can be loaded, but when the fast sliding will be very lag, and the early stage of the bitmap do not recycle , resulting in oom (memory overflow), and later on the internet to look up a variety of information, there are probably two ways:
1. When sliding, do not load the picture, wait for the slide to stop and then load, so the ListView needs to be onscrolllistener monitored, Get the start and end of the screen display (when there are headview and Footerview need to convert) and then download the corresponding network picture, each download one on the adapter for notifydatasetchanged operation, disadvantage: The code is relatively large, There is the sliding and not sliding need to use the lock to control, although according to this idea to achieve, but feel more trouble, not reliable;
2. Is the use of soft references, not much nonsense,:
Source: http://www.eoeandroid.com/thread-589993-1-1.html
Android ListView uses soft references to fix load network pictures fast sliding stutter