how to generate my thumbnails in the background?
<p>I have a <code>ListView</code> and a <code>SimpleCursorAdapter</code>.
My code for the <code>SimpleCursorAdapter</code> looks like this:</p>

<pre><code>private void listenAdapterErstellen()
{
    adapter = new SimpleCursorAdapter(this, R.layout.my_listlayout, 
            MainController.getInstance().getMyCursor(db), 
            new String[] {"Foo", "Test"}, 
            new int[] {R.id.imageViewFoo, R.id.textViewTest}, 0);

    adapter2.setViewBinder(new ViewBinder() {
        public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
            if (columnIndex == 1) {
                ImageView imageView = (ImageView) view;

                String Pic = cursor.getString(1);
                if (Pic != null) {
                    File file = new File(Pic);
                    if (file.exists()) {
                        imageView.setImageBitmap(MainController.getInstance().generateBitmap(Pic, SessionActivity.this));
                    }
                } else {
                    imageView.setImageResource(R.drawable.ic_launcher);
                }
                return true;
            }
            if (columnIndex == 2) {
                ...
            }

            return false;
        }
    });
}
</code></pre>

<p>the problem is, that the my <code>MainController.getInstance().generateBitmap()</code> which generate a small bitmap takes a lot of time. So it takes some time until the list is loaded.</p>

<p><strong>How can I generate the image for the list in the background and show the list instantly and then add the pictures?</strong></p>
