Android gallery with lazy load
<p>I have this gallery that loads images from urls, i'm first retrieving an InputStream like this:</p>

<pre><code>HttpParams httpparameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpparameters, 3000);
HttpConnectionParams.setSoTimeout(httpparameters, 5000);

DefaultHttpClient httpClient = new DefaultHttpClient(httpparameters);
HttpGet request = new HttpGet(urlString);
HttpResponse response = httpClient.execute(request);
InputStream is = response.getEntity().getContent();
</code></pre>

<p>And then, I read the stream with Bitmap bitmap = BitmapFactory.decodeStream(is, null, opts2);</p>

<p>The problem here is that sometimes i get the out of memory error. I fixed by modifying the inSampleSize, but I dont think its a good workdaround since the quality of the images are not good. Is there any way to load a list of images without getting the outofmemory and with the same quality as in the server? For example, in facebook app, when you enter to the gallery, it do a lazy load, you can see when you are in the grid layout, and when you open the image in full mode, you can scroll and see how it download all the images, and no out of memory issue, or lag while retrieving.</p>

<p>Or if you know of any android library that do this so i dont need to reinvent the wheel</p>

<p>Thank you</p>
