The expandable Listview inside the navigation box does not reach the bottom of the system panel

I am trying to implement an "Extensible List" inside the navigation box, as in the image below. There are 4 groups, and each group has many children. My problem is that the height of the expandable list is " short ." How can I make this height reach the bottom of the system bar, like a regular navigation box, using listview with data from 4 groups?

expandable listview

this is my main_activity.xml:

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="fill_parent" android:layout_height="fill_parent"> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent" > </FrameLayout> <ExpandableListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:choiceMode="singleChoice" android:divider="@android:color/black" android:dividerHeight="1dp" android:indicatorRight="430dp"/> </android.support.v4.widget.DrawerLayout> 

Any help would be greatly appreciated. Environment: Windows 7, ADT, Genymotion.

+3
android expandablelistview navigation-drawer
source share
1 answer

Set the background color to ExpandableListView as well

 <ExpandableListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:choiceMode="singleChoice" android:divider="@android:color/black" android:dividerHeight="1dp" android:indicatorRight="430dp" android:background="#fff"/> 

I think your extensible list is match_parent, but it has no background and only 4 elements.

+1
source share

All Articles