におけるボタンの使用android:background="#1000"
、背景用セレクタドロウアブルを(使用を記載されていますnull
の代わりに)デフォルトの状態が透明な色に設定されています。
* select or_with_transparency:*押され
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:drawable="@drawable/pressed" />
<item android:drawable="@drawable/transparent" />
</selector>
:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#0077cc" />
</shape>
透明:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#00000000"/>
</shape>
、その後ImageButton
用:
background = "@drawable/selector_with_transparency"
多分あなたは '3つの画像で... 'と言った方が良い考えです。 – idiottiger
私は各ボタンの2つまたは3つのイメージを作成する必要がありますか? – thenosic
'selector 'を使用して異なる時間を定義すると、各ボタンに2つまたは3つの画像も使用されます。 – idiottiger