title: Android: loading encrypted images into listview
body: <p>I'm having some problems loading encrypted images into <code>ListView</code>.</p>
  
  <p>I'm trying to efficiently load encrypted images from the web into a <code>ListView</code>. If these images weren't encrypted I'd use a library like Picasso and call it a day, but since they are it presents some problems.</p>
  
  <p>For one, if the image is not in cache it means I'd have to download it from the web or access it from the file system. In both ways the image comes in an encrypted form, having to decrypt it takes a non-trivial amount of time which makes it necessary to put the task of decrypting it on a background thread. Because it's on a background thread I run into the typical problems of a cell being recycled and losing a reference to an <code>ImageView</code>.</p>
  
  <p>Is there any good pattern to do this? Sorry if this is too vague. Thanks in advance. </p>