divider
forのスタイルを設定しようとしていListView
ます。私が欲しいのは、単純な2本の水平線だけです。
list.xml
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/ListView" >
</ListView>
スタイル.xml
<style name="ListView" parent="android:style/Widget.ListView">
<item name="android:divider">@drawable/divider</item>
<!-- 5dp: just to make sure there's enough space -->
<item name="android:dividerHeight">5dp</item>
</style>
仕切り.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#00ffff" />
<size android:height="1dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#ff0000" />
<size android:height="1dp" />
</shape>
</item>
</layer-list>
height of 5dp
結果は、 (2 のはずですよね?) とcolor of red
(2 番目の項目の色)の横線です。色付きの最初のアイテム#00ffff
はまったく表示されません。
誰かが2本の単純な水平線のコードを提案できますか?