导航抽屉内的可扩展列表视图

ExapandableListview inside Navigation Drawer

如何在像 Snapdeal 这样的导航抽屉中使用 ExapandableListview

我要的是this 目前的结果是this

尝试下面的 XML 工作正常的代码

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"

<include
    layout="@layout/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

<!-- This DrawerLayout has two children at the root  -->
<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

<!-- This LinearLayout represents the contents of the screen  -->
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

<!-- The main content view where fragments are loaded -->
<FrameLayout
    android:id="@+id/flContent"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />


</LinearLayout>
    <!-- The navigation drawer that comes from the left -->
    <!-- Note that `android:layout_gravity` needs to be set to 'start' -->

    <ExpandableListView
        android:id="@+id/lvExp"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:layout_gravity="start"/>   
</android.support.v4.widget.DrawerLayout>
</LinearLayout>