2012-03-17 9 views
0

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html設定色

このサンプルでは、​​非常にシンプルで使いやすいようです。

私がしたいのは、子要素とグループ要素の地色を元に戻すことです。 child_row.xml、group_row.xmlは使用しません。 私に正しい方法を教えてください。

ありがとうございます。あなたは以下のような拡張可能なリストビューのための新しいスタイルを定義することができ

+0

は、このリンクhttpを参照してください。 .com/2010/09/expandablelistview-on-andr oid.html – Aerrow

答えて

0

...聞くのlist_selector_backgroundで

<style name="Widget.MyExpandable" parent="android:Widget.ExpandableListView"> 
     <item name="android:listSelector">@drawable/list_selector_background</item> 
     <item name="android:divider">@color/ex_listview_stroke</item> 
     <item name="android:cacheColorHint">@color/color_foreground</item> 
     <item name="android:dividerHeight">0.5dp</item> 
</style> 

あなたはEXLISTのためのいくつかの状態を定義することが可能な描画可能セレクタファイルで立っている人のように表示したり、などを押します//techdroid.kbeanie:...、

、あなたはchildview.xmlのために別々の...描画可能な背景ファイルを作成する必要があり、子供と親のために異なる背景を持っているとparentview.xml

+0

ありがとう –