Load images over HTTP for list items
<p>I need to load images to go in each row in a <code>ListLayout</code>. Currently, I have an <code>ExecutorService</code> that essentially does the following:</p>

<pre><code>pubilc View getView(...) {
    ...
    this.executor.execute(new Runnable() {
        public void run() {
            // load image over HTTP
            image.post(new Runnable() {
                public void run() {
                    image.setImageBitmap(loadedBitmap);
                }
            });
        }
    });
}
</code></pre>

<p>Unfortunately, this really doesn't work too well, my images are constantly reloading with the wrong values, and my application crashes when trying to scroll. What is the recommended method of doing this?</p>

<hr>

<h1>EDIT</h1>

<p>I have updated my code to use <code>AsyncTask</code> implementations for loading images (makes so much more sense and so much less headache), but how should I sequence my tasks in my adapter? If I need to be only running one task at a time, that's fine, but I essentially need a list that I can add to and invalidate at will. What's also weird is that when I first start my application, the images load, but more often than not, they initially load in the wrong places, then reload a few times until everything looks okay. Weird. Is there a suggested way of doing this? </p>
