I am facing this issue on Android 2.3.5 (and possibly earlier Android versions)
When my expnadablelistview is collapsed background is displayed correctly. As soon as one group row is expanded its background turns black.
Here is the listview
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg"
>
<TextView
android:id="@+id/ExpandableListText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor = "#490600"
android:paddingRight = "25sp"
android:paddingLeft = "25sp"
/>
<ExpandableListView
android:id="@+id/ExpandableListView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:divider="#000000"
android:dividerHeight="1sp"
android:childDivider="#000000"
android:headerDividersEnabled="true"
android:footerDividersEnabled="true"
android:scrollingCache="false"
android:cacheColorHint="#00000000"
android:drawSelectorOnTop="true"
/>
</LinearLayout>
Here is XML for group row
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/TextViewGroup"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="50sp"
android:gravity="center_vertical"
android:textColor = "#490600"
android:paddingTop="7dip"
android:paddingBottom="7dip"
><!-- -->
</TextView>
</LinearLayout>
Here is child_row XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<!-- android:background="#666666" -->
<!-- -->
<TextView
android:id="@+id/TextViewChild01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30sp"
android:textColor = "#000000"
>
</TextView>
<TextView
android:id="@+id/TextViewChild02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10sp"
android:textColor = "#000000"
>
</TextView>
<TextView
android:id="@+id/TextViewChild03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10sp"
android:textColor = "#000000"
>
</TextView>
</LinearLayout>
Any help is highly appreciated
Customize your ExpandableListView class and then –
and then set it into your layout –