导航抽屉内扩展列表视图没有达到系统栏的底部 [英] Expandable Listview inside Navigation Drawer not reach bottom of system bar
问题描述
我想实现展开列表视图导航抽屉里像下面的图片。有4个组,每个组有许多儿童。我的问题是,可扩展列表视图的高度为短。我怎样才能让这个高度达到系统栏的底部就像使用列表视图与4组数据的正常航行抽屉里?
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?
这是我的main_activity.xml:
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>
任何帮助将大大AP preciated。
环境:Windows 7中,ADT,Genymotion
Any help would be greatly appreciated. Environment: Windows 7, ADT, Genymotion.
推荐答案
设置背景色为 ExpandableListView
以及
<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"/>
我觉得你的扩展列表是match_parent但它没有背景,只有4项。
I think your expandable list is match_parent but it has no background and only 4 items.
这篇关于导航抽屉内扩展列表视图没有达到系统栏的底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!