title: Shading artifact beneath an ImageView with a png that have fully transparent background
body: <p>I'm working on a Gingerbread (2.3.3) device. I have an ImageView which contains an arrow figure and have a fully transparent background which I need to draw on some background. The problem is that there's a "shading" artifact beneath the ImageView's bounding box.<br>
  If you look closely on the following image, you'll see the artifact i'm talking about: <a href="http://i.stack.imgur.com/e1cTy.png">1</a></p>
  
  <p>Both the foreground image and the background image have alpha channels and therefore are decoded as ARGB8888 (I double checked this by manually decoding their resources into a bitmap, print out the bitmap configuration which showed ARGB8888, and then assigning them to their respective views). I also configured the Activitiy's window to be PixelFormat.RGBA_8888 before the call to setContentView().</p>
  
  <p>Please don't refer me to threads that suggest decoding the bitmap as ARGB8888 and/or set the window to be RGBA_8888, since I tried both solutions, which didn't help.</p>
  
  <p>Any ideas how can I fix this issue?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here's the function which sets the Window pixel format and drawables (called directly from onCreate()):</p>
  
  <blockquote>
  <pre><code>public void testTransparency() {
      getWindow().setFormat(PixelFormat.RGBA_8888);
      setContentView(R.layout.transparency_test);
      LinearLayout ll = (LinearLayout)findViewById(R.id.ll);      
      Bitmap bgBmp = BitmapFactory.decodeResource(getResources(), R.raw.bg);
      Log.d(TAG,"BG BMP Config: " + bgBmp.getConfig());
      ll.setBackgroundDrawable(new BitmapDrawable(bgBmp));
      ImageView iv = (ImageView)findViewById(R.id.iv);
      iv.setBackgroundDrawable(null);
      Bitmap arrowBmp = BitmapFactory.decodeResource(getResources(), R.raw.big_arrow);
      Log.d(TAG,"Arrow BMP Config: " + arrowBmp.getConfig());
      iv.setImageBitmap(arrowBmp);
  }
  </code></pre>
  </blockquote>
  
  <p>And here's the (very simple) layout my test is using:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
      android:id="@+id/ll"  
      android:layout_width="fill_parent"  
      android:layout_height="fill_parent"  
      android:orientation="vertical"  
      android:gravity="center"&gt;
  
  &lt;ImageView android:id="@+id/iv"
      android:layout_width="72dp"
      android:layout_height="120dp"
      /&gt;&lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The 'bg' resource can be found at <a href="http://i.imgur.com/f0Vsw.png">2</a><br>
  The 'big_arrow' resource can be found at "http://i.imgur.com/3V6QU.png"</p>
  
  <p><strong>EDIT 2:</strong><br>
  I found out I can't reproduce the problem on the emulator, nor on my N1 (2.3.4) or XOOM (3.2.1). There are 2 options continuing from here:<br>
  1. The problem is device specific (Android based appliance i'm working on)<br>
  2. There's a specific problem with 2.3.4 and 32BPP framebuffer while rendering transparent PNGs on top of each other.</p>
  
  <p>Thanks.</p>