title: How to change the opacity of an image.
body: <p>I have an background image set to an <code>ImageView</code>, Now i want to change the opacity of an image without, for that i write this code to change the opacity of ImageView, but when i do so it remove the background image from the image view, So my question is how can i change the opacity of ImageView without removing background image form it.</p>
  
  <p><strong>Code i used is:</strong></p>
  
  <pre><code>ImageView imageView = (ImageView) findViewById(R.id.image_view);
  
  imageView.setBackgroundResource(R.drawable.theme1_page_header); // Set background image
  
  int opacity = 100; // from 0 to 255
  imageView.setBackgroundColor(opacity * 0x1000000); // change opacity of image
  </code></pre>