loading images in autocompletetextview suggestions using custom cursor adapter
<p>I am working on an app which requires an autocompletetextview for suggesting contacts in dropdown view. I am using a custom cursor adapter. My layout for one drop down item has imageview on the left (for showing image of the contact if available, else a default image).
I have used Asynctask to load images from the contacts. In my bindView method, I have following snippet to load images from the Async task.</p>

<pre><code>contactImage = new conactImage(viewHolder, cursor);
contactImage.execute(new String[] {userId});
</code></pre>

<p>and in the Asynctask's onPostExecute method, I set the image bitmap.</p>

<pre><code>mViewHolder.cImage.setImageBitmap(imageResultBitmap);
</code></pre>

<p>mViewHolder is the viewholder passed as argument in the previous snippet. </p>

<p>The problem I am facing is a bad UX. Suppose I entered two characters in the autocompletetextview. The images show up in a second. When I scroll, the images don't change unless I wait another 2 3 seconds to get the correct image loaded. And when I scroll fast, the views flicker a lot because of the random image bitmap changes. 
I understand it is a view recycling thing, but this gets annoying. Please suggest any other possible way to do the same. </p>

<p><img src="http://i.stack.imgur.com/Edc8J.png" alt="enter image description here">
on scrolling</p>

<p><img src="http://i.stack.imgur.com/3zYwV.png" alt="enter image description here"></p>

<p>Thanks!</p>
