Can you help me identify why there is a space between the group and the child? In my case I want spaces between all groups and the child should be right below the group with no space (but of course space to the next group. My problem looks like this: enter image description here

I have set the Group divider to this drawable (expandable_list_group_divider):

<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <size android:height="10dp"/>
</shape>

And the child divider to this (@drawable/expandable_list_child_divider):

<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <size android:height="0dp"/>
</shape>

I have defined the layout like this in the xml(it is a compund control):

<com.jws.MyExpandableListView
        android:id="@+id/expList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:layout_marginLeft="15dp"
        android:layout_marginRight="15dp"
        android:scrollbars="none"
        android:divider="@drawable/expandable_list_group_divider"
        android:childDivider="@drawable/expandable_list_child_divider"/>

Related posts

Recent Viewed