カスタム ListView があり、セル間に薄いグラデーションの仕切りを表示したいと考えています。ここに私のListViewのXMLがあります
<ListView
android:id="@+id/fil"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@drawable/list_divider"
android:dividerHeight="1dp"
android:clickable="true">
</ListView>
私の list_divider.xml には、次のように定義されたグラデーションがあります。
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<gradient
android:angle="0"
android:centerColor="#999999"
android:endColor="#00000000"
android:startColor="#00000000" />
</shape>
</item>
通常、これはグラデーション ディバイダーを表示しますが、機能しません。どうやら、問題は RelativeLayout ルートを持つ私の行レイアウトにあります:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#ffffff"
android:padding="5dip" >
背景を入れないとうまくいきます。しかし、たとえば白い背景を追加したい場合、完全な黒い仕切りが表示されます。ここで何が問題ですか?
ありがとう