android/eclipseで透明なPNGを透明に見せることに問題があります。
私はこれを持っています:
<ImageView
android:id="@+id/someid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/theimage" />
XMLグラフィックレイアウトでは、画像ビューでこの画像を使用すると、画像の透明度が黒で表示されます。
http://s7.directupload.net/file/d/3140/ehqd3yhm_png.htm
次の画像を使用すると、透明度が正しく表示されます。
http://s7.directupload.net/file/d/3140/dc5aco6n_png.htm
Windowsデスクトップの壁紙の前に透明な画像アイコンが表示されます。また、画像を手作業で確認して、両方が透明であることを確認することもできます。
これはバグですか、それとも何が起こっているのですか?Eclipse/androidに表示される透明なPNGを作成できません。だから私はあなたに見せるためにウェブから2番目の画像を取りました...
編集:私はたくさんの画像を透明にする必要があります、現在私はirfanviewを使用しています。他にどのようなプログラムが適していますか?
EDIT2:
注意すべきもう1つのことは私が置くことです
android:theme="@android:style/Theme.Light"
黒ではなく白のテーマが欲しいので、マニフェストに入れます。それが何か意味があるかどうかわからない。
XMLファイル全体は次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<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"/>
<!-- this is the imageview I test with, i added android:background="#FF0000" but does not help -->
<ImageView
android:id="@+id/beleg_imageabgeschlossen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onClickBarauslagen"
android:src="@drawable/dddd"
/>
<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" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/beleg_textbelegid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/textbelegid" />
<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" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/beleg_textbelegvonbis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/textbelegvonbis" />
<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" />
<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" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/beleg_textbelegabgeschlossen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/textbelegabgeschlossen" />
<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" />
<TextView
android:id="@+id/beleg_textbeleggesperrt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/textbeleggesperrt" />
<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" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/beleg_textbelegsummestunden"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/textbelegsummestunden" />
<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" />
</LinearLayout>
</LinearLayout>