title: Android (eclipse) PNG transparency shown as black (with pic examples)
body: <p>I have problems making transparent PNGs look transparent in android/eclipse.</p>
  
  <p>I have this:</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/someid"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/theimage" /&gt;
  </code></pre>
  
  <p>The XML graphical layout show the image transparency as BLACK when using this image in the imageview:</p>
  
  <p><a href="http://s7.directupload.net/file/d/3140/ehqd3yhm_png.htm" rel="nofollow">http://s7.directupload.net/file/d/3140/ehqd3yhm_png.htm</a></p>
  
  <p>If I use the following image the transparency is shown fine:</p>
  
  <p><a href="http://s7.directupload.net/file/d/3140/dc5aco6n_png.htm" rel="nofollow">http://s7.directupload.net/file/d/3140/dc5aco6n_png.htm</a></p>
  
  <p>You will see image icons as transparent infront of a windows desktop wallpaper. You may also verify the images by hand to see that they infact both are transparent.</p>
  
  <p>Is this a bug or what is going on? I am not able to create a transparent PNG that will show in eclipse/android. So I took the second image from the web to show you...</p>
  
  <p>EDIT: I need to make lots of images transparent, currenty I am using irfanview. What other program would suit?</p>
  
  <p><strong>EDIT2:</strong></p>
  
  <p>One additional thing to note is I put</p>
  
  <pre><code>android:theme="@android:style/Theme.Light"
  </code></pre>
  
  <p>into my manifest because I want white theme instead of black. Don't know if that has any implications.</p>
  
  <p>The whole XML file is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;ImageView
          android:id="@+id/beleg_imagegesperrt"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10dp"
          android:src="@drawable/ic_schloss_zu"/&gt;
  
      &lt;!-- this is the imageview I test with, i added  android:background="#FF0000" but does not help --&gt;
      &lt;ImageView
          android:id="@+id/beleg_imageabgeschlossen"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:onClick="onClickBarauslagen"
          android:src="@drawable/dddd" 
           /&gt;
  
      &lt;ImageView
          android:id="@+id/beleg_imageeinsatzberichtvorhanden"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10dp"
          android:src="@drawable/ic_notizbuch_unselected" /&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:id="@+id/beleg_textbelegid"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/textbelegid" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_belegid"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:paddingLeft="@dimen/abstand_liste"
              android:text="@string/belegid" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:id="@+id/beleg_textbelegvonbis"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/textbelegvonbis" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_belegvon"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:paddingLeft="@dimen/abstand_liste"
              android:text="@string/belegvon" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_belegbis"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:paddingLeft="@dimen/abstand_liste"
              android:text="@string/belegbis" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:id="@+id/beleg_textbelegabgeschlossen"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/textbelegabgeschlossen" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_belegabgeschlossen"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:paddingLeft="@dimen/abstand_liste"
              android:text="@string/belegabgeschlossen" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_textbeleggesperrt"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/textbeleggesperrt" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_beleggesperrt"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:paddingLeft="@dimen/abstand_liste"
              android:text="@string/beleggesperrt" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:id="@+id/beleg_textbelegsummestunden"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/textbelegsummestunden" /&gt;
  
          &lt;TextView
              android:id="@+id/beleg_belegsummestunden"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:paddingLeft="@dimen/abstand_liste"
              android:text="@string/belegsummestunden" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>