这个![导航抽屉不是全高] http://i.stack.imgur.com/hzQh4.png“我怎么能这样做?”。
我正在使用recyclelerview而不使用listview。
MainActivity.xml
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_height="match_parent"
android:layout_width="match_parent">
<fragment
android:id="@+id/fragment_navigation_drawer"
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
导航抽屉片段
<RelativeLayout 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" tools:context="com.dumposk129.create.stories.materialdesign.v1.NavigationDrawerFragment">
<LinearLayout
android:id="@+id/containerDrawerImage"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="280dp"
android:layout_height="140dp"
android:scaleType="fitXY"
android:src="@drawable/ic_wallpaper" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/drawerList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/containerDrawerImage" />
<FrameLayout
android:id="@+id/overlayFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/containerDrawerImage">
<ImageView
android:id="@+id/overlayImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</FrameLayout>