I wish to be able to have a RecyclerView inside the main page of a DrawyerLayout MainActivity. However, adding my code as below does n
First, you can remove android:padding="16dp" from the LinearLayout, that is why you see "blank space" around the list.
Then you want wrap_content height on the <include-d app bar layout so that it does not take the whole space.
And simply move the LinearLayout outside of the NavigationView
<?xml version="1.0" encoding="utf-8"?>
<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"
...
<!-- here is the content -->
<LinearLayout
android:orientation="vertical"
...
>
<!-- here is the toolbar -->
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
...
<RecyclerView
...
/>
</LinearLayout>
<!-- here is the drawer -->
<NavigationView
android:layout_gravity="start"
... >
</NavigationView>
</DrawerLayout>