Since I'm using a fixed menu for the navigation drawer I tried to use LinearLayout in DrawerLayout's second child instead of RecyclerView/ListView to make it easier to code. But the result is a full-screen linearlayout. Is there any way to use a regular view (like linearlayout) in DrawerLayout?
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello world"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bye world"/>
</LinearLayout>
See Question&Answers more detail:os