Reputation: 265
I am trying to implement 'Expandable Listview' inside Navigation Drawer like in the picture below. There are 4 groups, and each group has many children. My problem is, the height of expandable listview is "short". How can I make this height reach the bottom of system bar just like a normal navigation drawer using listview with 4 groups data?
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.
Upvotes: 3
Views: 3159
Reputation: 17401
Set 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 expandable list is match_parent but it has no background and only 4 items.
Upvotes: 1