title: Android ImageView setImageBitmap
body: <p>I'm trying to better understand how Android handle images in order to use memory more efficiently. I have an image stored in the <code>Bitmap</code> and I'm using <code>ImageView.setImageBitmap()</code> to display it. Now the question is - will it use the <code>Bitmap</code> I've passed it in the future, or it's making a copy of it and the <code>Bitmap</code> I've created isn't used anymore after the call to <code>setImageBitmap</code>?</p>
  
  <p>Asuming it's gonna keep reference to the <code>Bitmap</code> I've passed, how is it gonna behave when <code>Bitmap</code> was created via <code>BitmapFactory</code> using <code>inPurgeable</code> option? Will <code>ImageView</code> prevent the <code>Bitmap</code> from being temporarily purged from the memory? Is it gonna happen only when <code>ImageView</code> has <code>View.VISIBLE</code> state, or also when <code>View.GONE</code> and <code>View.INVISIBLE</code>? Or maybe only while <code>ImageView</code> is visible on the screen?</p>
  
  <p>And one more thing - looking through Android source code reveals that encoded byte data is always copied into memory (<code>inInputShareable</code> is currently ignored). Is it counted towards the 16/24MB memory limit for android Java application?</p>
  
  <p>Thanks</p>