title: android:dither="true" does not dither, what's wrong?
body: <p>I've been trying to get android to dither the background image of an activity - so far without success. I have no clue what's wrong.</p>
  
  <p>This is what I did:</p>
  
  <p>The root element of my activity layout is a LinearLayout:</p>
  
  <pre><code>&lt;LinearLayout android:id="@+id/AbsoluteLayout01"
  android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:gravity="center_horizontal"
  android:background="@drawable/background_dither"&gt;
  </code></pre>
  
  <p>where I added @drawable/background_dither as the background image.
  I put an XML file "background_dither.xml" in drawable-hdpi with the following content:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;bitmap
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/backimg"
  android:src="@drawable/background"
  android:dither="true"
  android:antialias="true" /&gt;
  </code></pre>
  
  <p>which references the actual image background.png in drawable-hdpi. The image, which includes a large color gradient, does show up, but with heavy color banding. From what I've learned from the SDK, this can be mitigated by using the /above proxy image definition together with specifying android:dither="true". This however, has absolutely no effect.</p>
  
  <p>What am I missing to get dithering working?</p>
  
  <p><code>EDIT</code>: Uploaded the <a href="http://rapidshare.com/files/444144083/lottofee.zip" rel="noreferrer">sources here</a> </p>
  
  <p><code>EDIT2</code>: After none of the suggested methods helped to get rid of color banding, after reading <a href="http://www.curious-creature.org/2010/12/08/bitmap-quality-banding-and-dithering/" rel="noreferrer">this blog post from Romain Guy</a>  I had the idea to check whether my PNG background has an alpha channel. It didn't. After adding one, android actually seems to use RGB8888, as said in the post and the banding is gone (also for 2.2). Still wondering why the other methods didn't work.</p>
  
  <p><code>EDIT3</code>: One has to make sure that the PNG not only has an alpha channel, but also at least one pixel that has an alpha value != FF, otherwise the android build tools will again strip that bitmap down to an indexed palette without alpha channel.</p>